https://bugs.freedesktop.org/show_bug.cgi?id=33077
Marek Olšák <maraeo(a)gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #15 from Marek Olšák <maraeo(a)gmail.com> ---
(In reply to comment #14)
> This report is a bit misleading, as it was for r300g …
[View More]originally, but it
> shifted to r600g in the meantime. Doom 3 is flawless on my rv350 with r300g,
> so I think this report should either be closed or the component should be
> changed to gallium/r600, if the problem still exists there.
Okay. Closing.
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=57763
Priority: medium
Bug ID: 57763
Assignee: dri-devel(a)lists.freedesktop.org
Summary: 3D applications have blank screen with "export
RADEON_HYPERZ=1" and git-da7029d
Severity: normal
Classification: Unclassified
OS: All
Reporter: andabata12(a)yahoo.it
Hardware: Other
Status: NEW
Version: git
Component: …
[View More]Drivers/Gallium/r300
Product: Mesa
With last graphics drivers from Git-da7029d on ATI RV530 (X1700) all the 3D
applications with "radeon: Acquired Hyper-Z", as Second Life, Racer, Quake III
demo have blank screen and in their respective logs these lines appear:
...
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
With dmesg command I obtain:
[ 3637.361007] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[ 3637.361220] Forbidden register 0x4F54 in cs at 36 (val=00000500)
[ 3637.361223] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[ 3637.406861] Forbidden register 0x4F54 in cs at 683 (val=00000500)
[ 3637.406871] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[ 3637.407391] Forbidden register 0x4F54 in cs at 36 (val=00000500)
[ 3637.407397] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
On Thu, Nov 29, 2012 at 9:45 PM, Luis R. Rodriguez
<mcgrof(a)do-not-panic.com> wrote:
> From: "Luis R. Rodriguez" <mcgrof(a)do-not-panic.com>
>
> spinlock_t should always be used.
>
> I was unable to build test with allmodconfig:
>
> mcgrof@frijol ~/linux-next (git::(no branch))$ make C=1 M=drivers/crypto/ux500/
>
> WARNING: Symbol version dump /home/mcgrof/linux-next/Module.symvers
> is missing; modules will have no dependencies and …
[View More]modversions.
>
> LD drivers/crypto/ux500/built-in.o
> Building modules, stage 2.
> MODPOST 0 modules
>
> Cc: Srinidhi Kasagar <srinidhi.kasagar(a)stericsson.com>
> Cc: Linus Walleij <linus.walleij(a)linaro.org>
> Cc: linux-arm-kernel(a)lists.infradead.org
> Reported-by: Hauke Mehrtens <hauke(a)hauke-m.de>
> Signed-off-by: Luis R. Rodriguez <mcgrof(a)do-not-panic.com>
Looks correct to me.
Acked-by: Linus Walleij <linus.walleij(a)linaro.org>
Yours,
Linus Walleij
[View Less]
Hello, all.
This patch introduces reference count of gem object name and resolves
the below issue.
In case that proces A shares its own gem object with process B,
process B opens a gem object name from process A to get its own
gem handle. But if process A closes the gem handle, the gem object
name to this is also released. So the gem object name that process
B referring to becomes invalid. I'm not sure that this is issue or
not but at least, gem object name IS NOT process-unique but IS
gem …
[View More]object-unique. So I think the gem object name shared by process A
should be preserved as long as the gem object has not been released.
Below is simple example.
at P1:
1. gem create => obj_refcount = 1
2. gem flink => obj_refcount = 2 (allocate obj_name)
5. gem close
a. obj_refcount = 2 and release the obj_name
b. obj_refcount = 1 once the obj_name release
3. and share it with P2
at P2:
4. gem open => obj_refcount = 3
6. the obj_name from P1 is invalid.
7. gem close => obj_refcount = 0(released)
And with this patch,
at P1:
1. gem create => obj_refcount = 1, name_refcount = 0
2. gem flink => obj_refcount = 2, name_refcount = 1 (allocate obj_name)
5. gem close => obj_refcount = 2, name_refcount = 1
3. and share it with P2
at P2:
4. gem open => obj_refcount = 3, name_refcount = 2
6. the gem object name from P1 is valid.
7. gem close
a. obj_refcount = 1, name_refcount = 0(released)
b. obj_refcount = 0(released) once name_ref_count = 0
There may be my missing point so please give me any advice.
Thanks,
Inki Dae
Signed-off-by: Inki Dae <inki.dae(a)samsung.com>
---
drivers/gpu/drm/drm_gem.c | 41 ++++++++++++++++++++++++++++++++++++++---
include/drm/drmP.h | 12 ++++++++++++
2 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 24efae4..16e4b75 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -145,6 +145,7 @@ int drm_gem_object_init(struct drm_device *dev,
kref_init(&obj->refcount);
atomic_set(&obj->handle_count, 0);
+ atomic_set(&obj->obj_name_count, 0);
obj->size = size;
return 0;
@@ -166,6 +167,7 @@ int drm_gem_private_object_init(struct drm_device *dev,
kref_init(&obj->refcount);
atomic_set(&obj->handle_count, 0);
+ atomic_set(&obj->obj_name_count, 0);
obj->size = size;
return 0;
@@ -452,6 +454,19 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
return -ENOENT;
again:
+ /*
+ * return current object name increasing reference count of
+ * this object name if exists already and not same process.
+ */
+ if (obj->name) {
+ if (file_priv->pid != current->pid)
+ atomic_inc(&obj->obj_name_count);
+
+ args->name = (uint64_t)obj->name;
+ drm_gem_object_unreference_unlocked(obj);
+ return 0;
+ }
+
if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0) {
ret = -ENOMEM;
goto err;
@@ -461,6 +476,7 @@ again:
if (!obj->name) {
ret = idr_get_new_above(&dev->object_name_idr, obj, 1,
&obj->name);
+ atomic_set(&obj->obj_name_count, 1);
args->name = (uint64_t) obj->name;
spin_unlock(&dev->object_name_lock);
@@ -502,8 +518,11 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,
spin_lock(&dev->object_name_lock);
obj = idr_find(&dev->object_name_idr, (int) args->name);
- if (obj)
+ if (obj) {
drm_gem_object_reference(obj);
+ if (file_priv->pid != current->pid)
+ atomic_inc(&obj->obj_name_count);
+ }
spin_unlock(&dev->object_name_lock);
if (!obj)
return -ENOENT;
@@ -612,9 +631,25 @@ void drm_gem_object_handle_free(struct drm_gem_object *obj)
/* Remove any name for this object */
spin_lock(&dev->object_name_lock);
if (obj->name) {
- idr_remove(&dev->object_name_idr, obj->name);
- obj->name = 0;
+ /*
+ * The name of this object could being referenced
+ * by another process so remove the name after checking
+ * the obj_name_count of this object.
+ */
+ if (atomic_dec_and_test(&obj->obj_name_count)) {
+ idr_remove(&dev->object_name_idr, obj->name);
+ obj->name = 0;
+ } else {
+ /*
+ * this object name is being referenced by other yet
+ * so do not unreference this.
+ */
+ spin_unlock(&dev->object_name_lock);
+ return;
+ }
+
spin_unlock(&dev->object_name_lock);
+
/*
* The object name held a reference to this object, drop
* that now.
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index fad21c9..27657b8 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -628,6 +628,18 @@ struct drm_gem_object {
/** Handle count of this object. Each handle also holds a reference */
atomic_t handle_count; /* number of handles on this object */
+ /*
+ * Name count of this object.
+ *
+ * This count is initialized as 0 with drm_gem_object_init or
+ * drm_gem_private_object_init call. After that, this count is
+ * increased if the name of this object exists already
+ * otherwise is set to 1 at flink. And finally, the name of
+ * this object will be released when this count reaches 0
+ * by gem close.
+ */
+ atomic_t obj_name_count;
+
/** Related drm device */
struct drm_device *dev;
--
1.7.4.1
[View Less]
At boot-up with newer kernels (at least v3.6.x, v3.7-rc) I always see
following on the bootup-display:
3.7-rcx: [drm:__gen6_gt_force_wake_mt_get] *ERROR* Timed out waiting
for forcewake old ack to clear.
3.6.x: [drm:__gen6_gt_force_wake_mt_get] *ERROR* Force wake wait timed out
It's an Ivy Bridge/64Bit Notebook.
I know there is a patch at
http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg14602.html
but it doesn't apply to v3.7-rcx.
This does not occur with the distro kernel …
[View More](kubuntu, kernel 3.2.29).
Jörg.
Please CC me, I am not subsribed
---
$ lspci
00:00.0 Host bridge: Intel Corporation Ivy Bridge DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge
Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host
Controller (rev 04)
00:16.0 Communication controller: Intel Corporation Panther Point MEI
Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced
Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation Panther Point High Definition
Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root
Port 1 (rev c4)
00:1c.2 PCI bridge: Intel Corporation Panther Point PCI Express Root
Port 3 (rev c4)
00:1c.4 PCI bridge: Intel Corporation Panther Point PCI Express Root
Port 5 (rev c4)
00:1c.5 PCI bridge: Intel Corporation Panther Point PCI Express Root
Port 6 (rev c4)
00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced
Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA
Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 07)
08:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)
$ lspci -vs 00:02.0
00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge
Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: Fujitsu Limited. Device 16c2
Flags: bus master, fast devsel, latency 0, IRQ 40
Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 4000 [size=64]
Expansion ROM at <unassigned> [disabled]
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [a4] PCI Advanced Features
Kernel driver in use: i915
[View Less]
tree: git://people.freedesktop.org/~danvet/drm-intel.git drm-intel-next-queued
head: 42dcedd4f2e715dc0313e359c8288e6397843fff
commit: 960e3564bfa464f92549383d41659f2aaeee1420 [70/75] drm/i915: Support readback of stolen objects upon error
sparse warnings:
+ drivers/gpu/drm/i915/i915_irq.c:939:43: sparse: incorrect type in argument 2 (different address spaces)
drivers/gpu/drm/i915/i915_irq.c:939:43: expected void const volatile [noderef] <asn:2>*src
drivers/gpu/drm/i915/i915_irq.…
[View More]c:939:43: got void *<noident>
vim +939 drivers/gpu/drm/i915/i915_irq.c
172975aa Chris Wilson 2011-12-14 923 /* Simply ignore tiling or any overlapping fence.
172975aa Chris Wilson 2011-12-14 924 * It's part of the error state, and this hopefully
172975aa Chris Wilson 2011-12-14 925 * captures what the GPU read.
172975aa Chris Wilson 2011-12-14 926 */
172975aa Chris Wilson 2011-12-14 927
172975aa Chris Wilson 2011-12-14 928 s = io_mapping_map_atomic_wc(dev_priv->mm.gtt_mapping,
172975aa Chris Wilson 2011-12-14 929 reloc_offset);
172975aa Chris Wilson 2011-12-14 930 memcpy_fromio(d, s, PAGE_SIZE);
172975aa Chris Wilson 2011-12-14 931 io_mapping_unmap_atomic(s);
960e3564 Chris Wilson 2012-11-15 932 } else if (src->stolen) {
960e3564 Chris Wilson 2012-11-15 933 unsigned long offset;
960e3564 Chris Wilson 2012-11-15 934
960e3564 Chris Wilson 2012-11-15 935 offset = dev_priv->mm.stolen_base;
960e3564 Chris Wilson 2012-11-15 936 offset += src->stolen->start;
960e3564 Chris Wilson 2012-11-15 937 offset += i << PAGE_SHIFT;
960e3564 Chris Wilson 2012-11-15 938
960e3564 Chris Wilson 2012-11-15 @939 memcpy_fromio(d, (void *)offset, PAGE_SIZE);
172975aa Chris Wilson 2011-12-14 940 } else {
9da3da66 Chris Wilson 2012-06-01 941 struct page *page;
172975aa Chris Wilson 2011-12-14 942 void *s;
172975aa Chris Wilson 2011-12-14 943
9da3da66 Chris Wilson 2012-06-01 944 page = i915_gem_object_get_page(src, i);
172975aa Chris Wilson 2011-12-14 945
9da3da66 Chris Wilson 2012-06-01 946 drm_clflush_pages(&page, 1);
9da3da66 Chris Wilson 2012-06-01 947
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
[View Less]