[BUG] gallium-gbm-target requires drm-pipe-loader
Hi The recently added gbm gallium target (./src/gallium/targets/gbm/gbm.c) requires HAVE_DRM_PIPE_LOADER for pipe_loader_drm_probe(). Otherwise, the compiler fails with an unresolved function-name. However, HAVE_DRM_PIPE_LOADER is not defined when compiling i915 only, so I need to compile gallium-nouveau, too, to get this symbol (or some other driver that pulls in HAVE_DRM_PIPE_LOADER). It's gallium_require_drm_loader() in configure.ac which defines this symbol and I actually have no idea how to fix this bug but include this in the "xi915)" case directly below the function definition. Maybe you know a better fix. Reproducable with current git and: ./autogen.sh --prefix=/usr --with-dri-driverdir=/usr/lib/xorg/modules/dri \ --with-dri-drivers=i915 \ --with-gallium-drivers=svga,swrast \ --with-egl-platforms=drm,x11,wayland \ --enable-gallium-llvm \ --enable-gallium-egl \ --enable-shared-dricore \ --enable-shared-glapi \ --enable-egl \ --enable-gles1 \ --enable-gles2 \ --enable-openvg \ --enable-glx-tls \ --enable-xcb \ --enable-texture-float Thanks David ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [Linaro-mm-sig] [RFC] Synchronizing access to buffers shared with dma-buf between drivers/devices
On Fri, Jun 8, 2012 at 3:56 PM, Erik Gilling wrote: >> I guess my other thought is that implicit vs explicit is not >> mutually exclusive, though I'd guess there'd be interesting >> deadlocks to have to debug if both were in use _at the same >> time_. :-) > > I think this is an approach worth investigating. I'd like a way to > either opt out of implicit sync or have a way to check if a dma-buf > has an attached fence and detach it. Actually, that could work really > well. Consider: > > * Each dma_buf has a single fence "slot" > * on submission > * the driver will extract the fence from the dma_buf and queue a wait on it. > * the driver will replace that fence with it's own complettion > fence before the job submission ioctl returns. > * dma_buf will have two userspace ioctls: > * DETACH: will return the fence as an FD to userspace and clear the > fence slot in the dma_buf > * ATTACH: takes a fence FD from userspace and attaches it to the > dma_buf fence slot. Returns an error if the fence slot is non-empty. > > In the android case, we can do a detach after every submission and an > attach right before. btw, I like this idea for implicit and explicit sync to coexist BR, -R ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC: Change OML_sync_control UST to CLOCK_MONOTONIC
Hi, I'm currently trying to make use of OML_sync_control extension to schedule presentation of video frames in xbmc. I've run into somewhat of a snag. It seem the spec doesn't specify what time the UST clock really is, nor can i find any mention of it elsewhere in docs. Code wise it seem to be using do_gettimeofday(), which seems like a rather poor choice given that it can jump forward and back in time due to settimeofday calls. We normally make use of clock_gettime(CLOCK_MONOTONIC) to timestamp display of video frames, so to avoid major changes I'd need a way to convert to gettimeofday (seem same as CLOCK_REALTIME). Currently i'm trying: struct timespec mon, rel; clock_gettime(CLOCK_MONOTONIC, &mon); clock_gettime(CLOCK_REALTIME , &rel); ticks += (rel.tv_sec - mon.tv_sec) * 10; ticks += (rel.tv_nsec - mon.tv_nsec); To convert between the two, but that is quite a hack both in the possibility of clock changes and scheduling errors. Is there a better way, or perhaps the DRI code should use CLOCK_MONOTONIC in the first place? Regards /Joakim ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 35622] [i945gme] 6358e6371b31671acbfa7c00336673f62ee928c5 result in a black screen in the main menu of portal in wine
https://bugs.freedesktop.org/show_bug.cgi?id=35622 Christopher Egert changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #6 from Christopher Egert 2012-06-10 07:37:11 PDT --- fixed with e2c08e824b9698f911fb6c20da43ce7476de0b3f -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
After recent changes HDMI code is ready to be enabled on DCE5. This patch just changes conditions to execute already present code on DCE5. Signed-off-by: Rafał Miłecki --- Dave: I know it's common to accept patches adding IDs even while merge window's closed. Is this OK for you to take this patch as it only enables existing code for more hardware? DCE5 has same HDMI engine/code as DCE4. This was tested for regressions on R6xx and Evergreen. It makes audio work on my NI Caicos card. --- drivers/gpu/drm/radeon/atombios_encoders.c |4 +++- drivers/gpu/drm/radeon/evergreen_hdmi.c|3 --- drivers/gpu/drm/radeon/r600_audio.c|2 +- drivers/gpu/drm/radeon/r600_hdmi.c |7 ++- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index e7b1ec5..486ccdf 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { r600_hdmi_enable(encoder); - if (ASIC_IS_DCE4(rdev)) + if (ASIC_IS_DCE6(rdev)) + ; /* TODO (use pointers instead of if-s?) */ + else if (ASIC_IS_DCE4(rdev)) evergreen_hdmi_setmode(encoder, adjusted_mode); else r600_hdmi_setmode(encoder, adjusted_mode); diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index a51f880..65c5416 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) - return; - /* Silent, r600_hdmi_enable will raise WARN for us */ if (!dig->afmt->enabled) return; diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index 7479a5c..79b5591 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c @@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder) */ static int r600_audio_chipset_supported(struct radeon_device *rdev) { - return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE5(rdev)) + return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE6(rdev)) || rdev->family == CHIP_RS600 || rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740; diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index 969c275..82a0a4c 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c @@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) - return; - /* Silent, r600_hdmi_enable will raise WARN for us */ if (!dig->afmt->enabled) return; @@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) uint32_t offset; u32 hdmi; - if (ASIC_IS_DCE5(rdev)) + if (ASIC_IS_DCE6(rdev)) return; /* Silent, r600_hdmi_enable will raise WARN for us */ @@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder) struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) + if (ASIC_IS_DCE6(rdev)) return; /* Called for ATOM_ENCODER_MODE_HDMI only */ -- 1.7.7 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
2012/6/10 Rafał Miłecki : > After recent changes HDMI code is ready to be enabled on DCE5. This > patch just changes conditions to execute already present code on DCE5. > > Signed-off-by: Rafał Miłecki > --- > Dave: I know it's common to accept patches adding IDs even while merge > window's closed. Is this OK for you to take this patch as it only > enables existing code for more hardware? > DCE5 has same HDMI engine/code as DCE4. > > This was tested for regressions on R6xx and Evergreen. It makes audio > work on my NI Caicos card. I wish to say THANKS here for AMD. They donated me with that Caicos card that allowed me to write this code and fix few minor things in audio support. -- Rafał ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
On Sun, Jun 10, 2012 at 11:59 AM, Rafał Miłecki wrote: > After recent changes HDMI code is ready to be enabled on DCE5. This > patch just changes conditions to execute already present code on DCE5. > > Signed-off-by: Rafał Miłecki > --- > Dave: I know it's common to accept patches adding IDs even while merge > window's closed. Is this OK for you to take this patch as it only > enables existing code for more hardware? > DCE5 has same HDMI engine/code as DCE4. > > This was tested for regressions on R6xx and Evergreen. It makes audio > work on my NI Caicos card. Reviewed-by: Alex Deucher Thanks for all of your hard work on this Rafał! Alex > --- > drivers/gpu/drm/radeon/atombios_encoders.c | 4 +++- > drivers/gpu/drm/radeon/evergreen_hdmi.c | 3 --- > drivers/gpu/drm/radeon/r600_audio.c | 2 +- > drivers/gpu/drm/radeon/r600_hdmi.c | 7 ++- > 4 files changed, 6 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c > b/drivers/gpu/drm/radeon/atombios_encoders.c > index e7b1ec5..486ccdf 100644 > --- a/drivers/gpu/drm/radeon/atombios_encoders.c > +++ b/drivers/gpu/drm/radeon/atombios_encoders.c > @@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder > *encoder, > > if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { > r600_hdmi_enable(encoder); > - if (ASIC_IS_DCE4(rdev)) > + if (ASIC_IS_DCE6(rdev)) > + ; /* TODO (use pointers instead of if-s?) */ > + else if (ASIC_IS_DCE4(rdev)) > evergreen_hdmi_setmode(encoder, adjusted_mode); > else > r600_hdmi_setmode(encoder, adjusted_mode); > diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c > b/drivers/gpu/drm/radeon/evergreen_hdmi.c > index a51f880..65c5416 100644 > --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c > +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c > @@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, > struct drm_display_mode > struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; > uint32_t offset; > > - if (ASIC_IS_DCE5(rdev)) > - return; > - > /* Silent, r600_hdmi_enable will raise WARN for us */ > if (!dig->afmt->enabled) > return; > diff --git a/drivers/gpu/drm/radeon/r600_audio.c > b/drivers/gpu/drm/radeon/r600_audio.c > index 7479a5c..79b5591 100644 > --- a/drivers/gpu/drm/radeon/r600_audio.c > +++ b/drivers/gpu/drm/radeon/r600_audio.c > @@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder) > */ > static int r600_audio_chipset_supported(struct radeon_device *rdev) > { > - return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE5(rdev)) > + return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE6(rdev)) > || rdev->family == CHIP_RS600 > || rdev->family == CHIP_RS690 > || rdev->family == CHIP_RS740; > diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c > b/drivers/gpu/drm/radeon/r600_hdmi.c > index 969c275..82a0a4c 100644 > --- a/drivers/gpu/drm/radeon/r600_hdmi.c > +++ b/drivers/gpu/drm/radeon/r600_hdmi.c > @@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, > struct drm_display_mode *mod > struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; > uint32_t offset; > > - if (ASIC_IS_DCE5(rdev)) > - return; > - > /* Silent, r600_hdmi_enable will raise WARN for us */ > if (!dig->afmt->enabled) > return; > @@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) > uint32_t offset; > u32 hdmi; > > - if (ASIC_IS_DCE5(rdev)) > + if (ASIC_IS_DCE6(rdev)) > return; > > /* Silent, r600_hdmi_enable will raise WARN for us */ > @@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder) > struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; > uint32_t offset; > > - if (ASIC_IS_DCE5(rdev)) > + if (ASIC_IS_DCE6(rdev)) > return; > > /* Called for ATOM_ENCODER_MODE_HDMI only */ > -- > 1.7.7 > ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
On 10.06.2012 21:22, Alex Deucher wrote: On Sun, Jun 10, 2012 at 11:59 AM, Rafał Miłecki wrote: After recent changes HDMI code is ready to be enabled on DCE5. This patch just changes conditions to execute already present code on DCE5. Signed-off-by: Rafał Miłecki --- Dave: I know it's common to accept patches adding IDs even while merge window's closed. Is this OK for you to take this patch as it only enables existing code for more hardware? DCE5 has same HDMI engine/code as DCE4. This was tested for regressions on R6xx and Evergreen. It makes audio work on my NI Caicos card. Reviewed-by: Alex Deucher Thanks for all of your hard work on this Rafał! Yeah indeed, keep sticking with it! We really need more people working on the driver. Unfortunately testing it with my Cayman based card shows that it plays with the correct speed, audio registers seems to be ok, but unfortunately I don't hear any sound at all :( Going to dig into it tomorrow, Christian. Alex --- drivers/gpu/drm/radeon/atombios_encoders.c |4 +++- drivers/gpu/drm/radeon/evergreen_hdmi.c|3 --- drivers/gpu/drm/radeon/r600_audio.c|2 +- drivers/gpu/drm/radeon/r600_hdmi.c |7 ++- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index e7b1ec5..486ccdf 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { r600_hdmi_enable(encoder); - if (ASIC_IS_DCE4(rdev)) + if (ASIC_IS_DCE6(rdev)) + ; /* TODO (use pointers instead of if-s?) */ + else if (ASIC_IS_DCE4(rdev)) evergreen_hdmi_setmode(encoder, adjusted_mode); else r600_hdmi_setmode(encoder, adjusted_mode); diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index a51f880..65c5416 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) - return; - /* Silent, r600_hdmi_enable will raise WARN for us */ if (!dig->afmt->enabled) return; diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index 7479a5c..79b5591 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c @@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder) */ static int r600_audio_chipset_supported(struct radeon_device *rdev) { - return (rdev->family>= CHIP_R600&& !ASIC_IS_DCE5(rdev)) + return (rdev->family>= CHIP_R600&& !ASIC_IS_DCE6(rdev)) || rdev->family == CHIP_RS600 || rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740; diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index 969c275..82a0a4c 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c @@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) - return; - /* Silent, r600_hdmi_enable will raise WARN for us */ if (!dig->afmt->enabled) return; @@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) uint32_t offset; u32 hdmi; - if (ASIC_IS_DCE5(rdev)) + if (ASIC_IS_DCE6(rdev)) return; /* Silent, r600_hdmi_enable will raise WARN for us */ @@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder) struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) + if (ASIC_IS_DCE6(rdev)) return; /* Called for ATOM_ENCODER_MODE_HDMI only */ -- 1.7.7 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
2012/6/10 Christian König : > On 10.06.2012 21:22, Alex Deucher wrote: >> >> On Sun, Jun 10, 2012 at 11:59 AM, Rafał Miłecki wrote: >>> >>> After recent changes HDMI code is ready to be enabled on DCE5. This >>> patch just changes conditions to execute already present code on DCE5. >>> >>> Signed-off-by: Rafał Miłecki >>> --- >>> Dave: I know it's common to accept patches adding IDs even while merge >>> window's closed. Is this OK for you to take this patch as it only >>> enables existing code for more hardware? >>> DCE5 has same HDMI engine/code as DCE4. >>> >>> This was tested for regressions on R6xx and Evergreen. It makes audio >>> work on my NI Caicos card. >> >> Reviewed-by: Alex Deucher >> >> Thanks for all of your hard work on this Rafał! > > Yeah indeed, keep sticking with it! We really need more people working on > the driver. Thanks :) > Unfortunately testing it with my Cayman based card shows that it plays with > the correct speed, audio registers seems to be ok, but unfortunately I don't > hear any sound at all :( If you can easily switch between fglrx and radeon, comparing "avivotool regs hdmi" should give a quick hint. Unless you have better debugging tools at AMD :) -- Rafał ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm via: initialize object_idr
From: Márton Németh The field obejct_idr of struct drm_via_private was introduced with the commit http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=77ee8f3825054f23b17e9c8f728f061defd86cdc . In that patch idr_init(&dev->object_name_idr) was called instead of idr_init(&dev_priv->object_idr) by mistake, leaving the dev_priv->object_idr uninitialized. To be more exact, the object_idr buffer is filled with zeros because of kzalloc(), but the dev_priv->object_idr.lock spinlock can cause system freeze at lib/idr.c:move_to_free_list() when spin_lock_irqsave() is called on this spinlock. The patch was tested on Clevo D4J, model D410J laptop, on the following hardware, without AGP kernel module loaded: # lspci -s 01:00.0 -n 01:00.0 0300: 1106:3108 (rev 01) # lspci -s 01:00.0 -v 01:00.0 VGA compatible controller: VIA Technologies, Inc. K8M800/K8N800/K8N800A [S3 UniChrome Pro] (rev 01) (prog-if 00 [VGA controller]) Subsystem: CLEVO/KAPOK Computer Device 4702 Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16 Memory at f000 (32-bit, prefetchable) [size=64M] Memory at d100 (32-bit, non-prefetchable) [size=16M] Expansion ROM at [disabled] Capabilities: [60] Power Management version 2 Capabilities: [70] AGP version 3.0 Signed-off-by: Márton Németh --- diff --git a/drivers/gpu/drm/via/via_map.c b/drivers/gpu/drm/via/via_map.c index 1f18225..c126182 100644 --- a/drivers/gpu/drm/via/via_map.c +++ b/drivers/gpu/drm/via/via_map.c @@ -100,12 +100,11 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset) if (dev_priv == NULL) return -ENOMEM; + idr_init(&dev_priv->object_idr); dev->dev_private = (void *)dev_priv; dev_priv->chipset = chipset; - idr_init(&dev->object_name_idr); - pci_set_master(dev->pdev); ret = drm_vblank_init(dev, 1); ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 04/12] v4l: vb2-dma-contig: add setup of sglist for MMAP buffers
Hi Tomasz, On Friday 08 June 2012 16:31:31 Tomasz Stanislawski wrote: > Hi Laurent and Subash, > > I confirm the issue found by Subash. The function vb2_dc_kaddr_to_pages does > fail for some occasions. The failures are rather strange like 'got 95 of > 150 pages'. It took me some time to find the reason of the problem. > > I found that dma_alloc_coherent for iommu an ARM does use ioremap_page_range > to map a buffer to the kernel space. The mapping is done by updating the > page-table. > > The problem is that any process has a different first-level page-table. The > ioremap_page_range updates only the table for init process. The PT present > in current->mm shares a majority of entries of 1st-level PT at kernel range > (above 0xc000) but *not all*. That is why vb2_dc_kaddr_to_pages worked > for small buffers and occasionally failed for larger buffers. > > I found two ways to fix this problem. > a) use &init_mm instead of current->mm while creating an artificial vma > b) access the dma memory by calling >*((volatile int *)kaddr) = 0; >before calling follow_pfn >This way a fault is generated and the PT is >updated by copying entries from init_mm. > > What do you think about presented solutions? Just to be sure, this is a hack until dma_get_sgtable is available, and it won't make it to mainline, right ? In that case using init_mm seem easier. -- Regards, Laurent Pinchart ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [RFC] Documentation: DRM framework documentation
Hi Hans, On Thursday 07 June 2012 11:13:30 Hans Verkuil wrote: > Hi Laurent! > > I completely missed this when you posted this a week ago, but thank you for > doing this. One suggestion: cross-post the next version to linux-media as > well: I think this is useful for V4L2 as well. I didn't think it would be useful, but sure, I can do that? > Some comments below: > > On Wed 30 May 2012 15:13:29 Laurent Pinchart wrote: > > Signed-off-by: Laurent Pinchart > > --- > > > > Documentation/drm.txt | 1265 > > 1 files changed, 1265 insertions(+), 0 deletions(-) > > create mode 100644 Documentation/drm.txt > > > > Hi everybody, > > > > Here's the DRM kernel framework documentation I wrote while developing the > > Renesas SH Mobile DRM driver. It hopefully covers most of what's needed to > > write a simple DRM driver (although some areas are not documented, such as > > properties or the fbdev compatibility layer). > > > > I can convert the documentation to DocBook if needed and integrate it with > > the existing "documentation stub". In that case I'm thinking of splitting > > the DocBook documentation in two parts, userspace API documentation (that > > someone would have to fill, any volunteer ? ;-)) and kernel API > > documentation. Would that be fine ? > > > > Last but not least, now that documentation exists (albeit in an incomplete > > state), we need to make sure it won't get outdated too quickly. As nobody > > will volunteer to maintain it (feel free to prove me wrong though), I'd > > like to propose the same rule that we already follow in V4L: any patch > > that touches the API won't get merged if it doesn't update the > > documentation. Do you think this could work out ? > > I strongly recommend that this policy is adopted. It is working out very > well in V4L2. Documentation can be a pain, but if you do it when you add new > functionality (and you still remember what it was you did :-) ), then it > isn't too bad. [snip] > > +"A CRTC is an abstraction representing a part of the chip that contains a > > +pointer to a scanout buffer. > > A definition of a 'scanout buffer' would be useful here. Also: what does > CRTC stand for? I think it stands for cathode ray tube controller. > In general, I think it would be good to explain abbreviations (DRM, GEM, > KMS, etc.) That way the terminology is easier to understand. Good point. I'll add a glossary. [snip] > Impressive work, you clearly have way too much time on your hands :-) Thank you. I'm not sure I agree with you, having to allocate sleep time in my schedule isn't really a sign of having too much free time ;-) -- Regards, Laurent Pinchart ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[BUG] gallium-gbm-target requires drm-pipe-loader
Hi The recently added gbm gallium target (./src/gallium/targets/gbm/gbm.c) requires HAVE_DRM_PIPE_LOADER for pipe_loader_drm_probe(). Otherwise, the compiler fails with an unresolved function-name. However, HAVE_DRM_PIPE_LOADER is not defined when compiling i915 only, so I need to compile gallium-nouveau, too, to get this symbol (or some other driver that pulls in HAVE_DRM_PIPE_LOADER). It's gallium_require_drm_loader() in configure.ac which defines this symbol and I actually have no idea how to fix this bug but include this in the "xi915)" case directly below the function definition. Maybe you know a better fix. Reproducable with current git and: ./autogen.sh --prefix=/usr --with-dri-driverdir=/usr/lib/xorg/modules/dri \ --with-dri-drivers=i915 \ --with-gallium-drivers=svga,swrast \ --with-egl-platforms=drm,x11,wayland \ --enable-gallium-llvm \ --enable-gallium-egl \ --enable-shared-dricore \ --enable-shared-glapi \ --enable-egl \ --enable-gles1 \ --enable-gles2 \ --enable-openvg \ --enable-glx-tls \ --enable-xcb \ --enable-texture-float Thanks David
RFC: Change OML_sync_control UST to CLOCK_MONOTONIC
Hi, I'm currently trying to make use of OML_sync_control extension to schedule presentation of video frames in xbmc. I've run into somewhat of a snag. It seem the spec doesn't specify what time the UST clock really is, nor can i find any mention of it elsewhere in docs. Code wise it seem to be using do_gettimeofday(), which seems like a rather poor choice given that it can jump forward and back in time due to settimeofday calls. We normally make use of clock_gettime(CLOCK_MONOTONIC) to timestamp display of video frames, so to avoid major changes I'd need a way to convert to gettimeofday (seem same as CLOCK_REALTIME). Currently i'm trying: struct timespec mon, rel; clock_gettime(CLOCK_MONOTONIC, &mon); clock_gettime(CLOCK_REALTIME , &rel); ticks += (rel.tv_sec - mon.tv_sec) * 10; ticks += (rel.tv_nsec - mon.tv_nsec); To convert between the two, but that is quite a hack both in the possibility of clock changes and scheduling errors. Is there a better way, or perhaps the DRI code should use CLOCK_MONOTONIC in the first place? Regards /Joakim
[Bug 35622] [i945gme] 6358e6371b31671acbfa7c00336673f62ee928c5 result in a black screen in the main menu of portal in wine
https://bugs.freedesktop.org/show_bug.cgi?id=35622 Christopher Egert changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #6 from Christopher Egert 2012-06-10 07:37:11 PDT --- fixed with e2c08e824b9698f911fb6c20da43ce7476de0b3f -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
After recent changes HDMI code is ready to be enabled on DCE5. This patch just changes conditions to execute already present code on DCE5. Signed-off-by: Rafa? Mi?ecki --- Dave: I know it's common to accept patches adding IDs even while merge window's closed. Is this OK for you to take this patch as it only enables existing code for more hardware? DCE5 has same HDMI engine/code as DCE4. This was tested for regressions on R6xx and Evergreen. It makes audio work on my NI Caicos card. --- drivers/gpu/drm/radeon/atombios_encoders.c |4 +++- drivers/gpu/drm/radeon/evergreen_hdmi.c|3 --- drivers/gpu/drm/radeon/r600_audio.c|2 +- drivers/gpu/drm/radeon/r600_hdmi.c |7 ++- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index e7b1ec5..486ccdf 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { r600_hdmi_enable(encoder); - if (ASIC_IS_DCE4(rdev)) + if (ASIC_IS_DCE6(rdev)) + ; /* TODO (use pointers instead of if-s?) */ + else if (ASIC_IS_DCE4(rdev)) evergreen_hdmi_setmode(encoder, adjusted_mode); else r600_hdmi_setmode(encoder, adjusted_mode); diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index a51f880..65c5416 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) - return; - /* Silent, r600_hdmi_enable will raise WARN for us */ if (!dig->afmt->enabled) return; diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index 7479a5c..79b5591 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c @@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder) */ static int r600_audio_chipset_supported(struct radeon_device *rdev) { - return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE5(rdev)) + return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE6(rdev)) || rdev->family == CHIP_RS600 || rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740; diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index 969c275..82a0a4c 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c @@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) - return; - /* Silent, r600_hdmi_enable will raise WARN for us */ if (!dig->afmt->enabled) return; @@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) uint32_t offset; u32 hdmi; - if (ASIC_IS_DCE5(rdev)) + if (ASIC_IS_DCE6(rdev)) return; /* Silent, r600_hdmi_enable will raise WARN for us */ @@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder) struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; uint32_t offset; - if (ASIC_IS_DCE5(rdev)) + if (ASIC_IS_DCE6(rdev)) return; /* Called for ATOM_ENCODER_MODE_HDMI only */ -- 1.7.7
[PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
2012/6/10 Rafa? Mi?ecki : > After recent changes HDMI code is ready to be enabled on DCE5. This > patch just changes conditions to execute already present code on DCE5. > > Signed-off-by: Rafa? Mi?ecki > --- > Dave: I know it's common to accept patches adding IDs even while merge > window's closed. Is this OK for you to take this patch as it only > enables existing code for more hardware? > DCE5 has same HDMI engine/code as DCE4. > > This was tested for regressions on R6xx and Evergreen. It makes audio > work on my NI Caicos card. I wish to say THANKS here for AMD. They donated me with that Caicos card that allowed me to write this code and fix few minor things in audio support. -- Rafa?
[PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
On Sun, Jun 10, 2012 at 11:59 AM, Rafa? Mi?ecki wrote: > After recent changes HDMI code is ready to be enabled on DCE5. This > patch just changes conditions to execute already present code on DCE5. > > Signed-off-by: Rafa? Mi?ecki > --- > Dave: I know it's common to accept patches adding IDs even while merge > window's closed. Is this OK for you to take this patch as it only > enables existing code for more hardware? > DCE5 has same HDMI engine/code as DCE4. > > This was tested for regressions on R6xx and Evergreen. It makes audio > work on my NI Caicos card. Reviewed-by: Alex Deucher Thanks for all of your hard work on this Rafa?! Alex > --- > ?drivers/gpu/drm/radeon/atombios_encoders.c | ? ?4 +++- > ?drivers/gpu/drm/radeon/evergreen_hdmi.c ? ?| ? ?3 --- > ?drivers/gpu/drm/radeon/r600_audio.c ? ? ? ?| ? ?2 +- > ?drivers/gpu/drm/radeon/r600_hdmi.c ? ? ? ? | ? ?7 ++- > ?4 files changed, 6 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c > b/drivers/gpu/drm/radeon/atombios_encoders.c > index e7b1ec5..486ccdf 100644 > --- a/drivers/gpu/drm/radeon/atombios_encoders.c > +++ b/drivers/gpu/drm/radeon/atombios_encoders.c > @@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder > *encoder, > > ? ? ? ?if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { > ? ? ? ? ? ? ? ?r600_hdmi_enable(encoder); > - ? ? ? ? ? ? ? if (ASIC_IS_DCE4(rdev)) > + ? ? ? ? ? ? ? if (ASIC_IS_DCE6(rdev)) > + ? ? ? ? ? ? ? ? ? ? ? ; /* TODO (use pointers instead of if-s?) */ > + ? ? ? ? ? ? ? else if (ASIC_IS_DCE4(rdev)) > ? ? ? ? ? ? ? ? ? ? ? ?evergreen_hdmi_setmode(encoder, adjusted_mode); > ? ? ? ? ? ? ? ?else > ? ? ? ? ? ? ? ? ? ? ? ?r600_hdmi_setmode(encoder, adjusted_mode); > diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c > b/drivers/gpu/drm/radeon/evergreen_hdmi.c > index a51f880..65c5416 100644 > --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c > +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c > @@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, > struct drm_display_mode > ? ? ? ?struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; > ? ? ? ?uint32_t offset; > > - ? ? ? if (ASIC_IS_DCE5(rdev)) > - ? ? ? ? ? ? ? return; > - > ? ? ? ?/* Silent, r600_hdmi_enable will raise WARN for us */ > ? ? ? ?if (!dig->afmt->enabled) > ? ? ? ? ? ? ? ?return; > diff --git a/drivers/gpu/drm/radeon/r600_audio.c > b/drivers/gpu/drm/radeon/r600_audio.c > index 7479a5c..79b5591 100644 > --- a/drivers/gpu/drm/radeon/r600_audio.c > +++ b/drivers/gpu/drm/radeon/r600_audio.c > @@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder) > ?*/ > ?static int r600_audio_chipset_supported(struct radeon_device *rdev) > ?{ > - ? ? ? return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE5(rdev)) > + ? ? ? return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE6(rdev)) > ? ? ? ? ? ? ? ?|| rdev->family == CHIP_RS600 > ? ? ? ? ? ? ? ?|| rdev->family == CHIP_RS690 > ? ? ? ? ? ? ? ?|| rdev->family == CHIP_RS740; > diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c > b/drivers/gpu/drm/radeon/r600_hdmi.c > index 969c275..82a0a4c 100644 > --- a/drivers/gpu/drm/radeon/r600_hdmi.c > +++ b/drivers/gpu/drm/radeon/r600_hdmi.c > @@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, > struct drm_display_mode *mod > ? ? ? ?struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; > ? ? ? ?uint32_t offset; > > - ? ? ? if (ASIC_IS_DCE5(rdev)) > - ? ? ? ? ? ? ? return; > - > ? ? ? ?/* Silent, r600_hdmi_enable will raise WARN for us */ > ? ? ? ?if (!dig->afmt->enabled) > ? ? ? ? ? ? ? ?return; > @@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) > ? ? ? ?uint32_t offset; > ? ? ? ?u32 hdmi; > > - ? ? ? if (ASIC_IS_DCE5(rdev)) > + ? ? ? if (ASIC_IS_DCE6(rdev)) > ? ? ? ? ? ? ? ?return; > > ? ? ? ?/* Silent, r600_hdmi_enable will raise WARN for us */ > @@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder) > ? ? ? ?struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; > ? ? ? ?uint32_t offset; > > - ? ? ? if (ASIC_IS_DCE5(rdev)) > + ? ? ? if (ASIC_IS_DCE6(rdev)) > ? ? ? ? ? ? ? ?return; > > ? ? ? ?/* Called for ATOM_ENCODER_MODE_HDMI only */ > -- > 1.7.7 >
[PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
On 10.06.2012 21:22, Alex Deucher wrote: > On Sun, Jun 10, 2012 at 11:59 AM, Rafa? Mi?ecki wrote: >> After recent changes HDMI code is ready to be enabled on DCE5. This >> patch just changes conditions to execute already present code on DCE5. >> >> Signed-off-by: Rafa? Mi?ecki >> --- >> Dave: I know it's common to accept patches adding IDs even while merge >> window's closed. Is this OK for you to take this patch as it only >> enables existing code for more hardware? >> DCE5 has same HDMI engine/code as DCE4. >> >> This was tested for regressions on R6xx and Evergreen. It makes audio >> work on my NI Caicos card. > Reviewed-by: Alex Deucher > > Thanks for all of your hard work on this Rafa?! Yeah indeed, keep sticking with it! We really need more people working on the driver. Unfortunately testing it with my Cayman based card shows that it plays with the correct speed, audio registers seems to be ok, but unfortunately I don't hear any sound at all :( Going to dig into it tomorrow, Christian. > > Alex > >> --- >> drivers/gpu/drm/radeon/atombios_encoders.c |4 +++- >> drivers/gpu/drm/radeon/evergreen_hdmi.c|3 --- >> drivers/gpu/drm/radeon/r600_audio.c|2 +- >> drivers/gpu/drm/radeon/r600_hdmi.c |7 ++- >> 4 files changed, 6 insertions(+), 10 deletions(-) >> >> diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c >> b/drivers/gpu/drm/radeon/atombios_encoders.c >> index e7b1ec5..486ccdf 100644 >> --- a/drivers/gpu/drm/radeon/atombios_encoders.c >> +++ b/drivers/gpu/drm/radeon/atombios_encoders.c >> @@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder >> *encoder, >> >> if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { >> r600_hdmi_enable(encoder); >> - if (ASIC_IS_DCE4(rdev)) >> + if (ASIC_IS_DCE6(rdev)) >> + ; /* TODO (use pointers instead of if-s?) */ >> + else if (ASIC_IS_DCE4(rdev)) >> evergreen_hdmi_setmode(encoder, adjusted_mode); >> else >> r600_hdmi_setmode(encoder, adjusted_mode); >> diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c >> b/drivers/gpu/drm/radeon/evergreen_hdmi.c >> index a51f880..65c5416 100644 >> --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c >> +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c >> @@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, >> struct drm_display_mode >> struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; >> uint32_t offset; >> >> - if (ASIC_IS_DCE5(rdev)) >> - return; >> - >> /* Silent, r600_hdmi_enable will raise WARN for us */ >> if (!dig->afmt->enabled) >> return; >> diff --git a/drivers/gpu/drm/radeon/r600_audio.c >> b/drivers/gpu/drm/radeon/r600_audio.c >> index 7479a5c..79b5591 100644 >> --- a/drivers/gpu/drm/radeon/r600_audio.c >> +++ b/drivers/gpu/drm/radeon/r600_audio.c >> @@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder) >> */ >> static int r600_audio_chipset_supported(struct radeon_device *rdev) >> { >> - return (rdev->family>= CHIP_R600&& !ASIC_IS_DCE5(rdev)) >> + return (rdev->family>= CHIP_R600&& !ASIC_IS_DCE6(rdev)) >> || rdev->family == CHIP_RS600 >> || rdev->family == CHIP_RS690 >> || rdev->family == CHIP_RS740; >> diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c >> b/drivers/gpu/drm/radeon/r600_hdmi.c >> index 969c275..82a0a4c 100644 >> --- a/drivers/gpu/drm/radeon/r600_hdmi.c >> +++ b/drivers/gpu/drm/radeon/r600_hdmi.c >> @@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, >> struct drm_display_mode *mod >> struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; >> uint32_t offset; >> >> - if (ASIC_IS_DCE5(rdev)) >> - return; >> - >> /* Silent, r600_hdmi_enable will raise WARN for us */ >> if (!dig->afmt->enabled) >> return; >> @@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) >> uint32_t offset; >> u32 hdmi; >> >> - if (ASIC_IS_DCE5(rdev)) >> + if (ASIC_IS_DCE6(rdev)) >> return; >> >> /* Silent, r600_hdmi_enable will raise WARN for us */ >> @@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder) >> struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; >> uint32_t offset; >> >> - if (ASIC_IS_DCE5(rdev)) >> + if (ASIC_IS_DCE6(rdev)) >> return; >> >> /* Called for ATOM_ENCODER_MODE_HDMI only */ >> -- >> 1.7.7 >>
[PATCH] drm via: initialize object_idr
From: M?rton N?meth The field obejct_idr of struct drm_via_private was introduced with the commit http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=77ee8f3825054f23b17e9c8f728f061defd86cdc . In that patch idr_init(&dev->object_name_idr) was called instead of idr_init(&dev_priv->object_idr) by mistake, leaving the dev_priv->object_idr uninitialized. To be more exact, the object_idr buffer is filled with zeros because of kzalloc(), but the dev_priv->object_idr.lock spinlock can cause system freeze at lib/idr.c:move_to_free_list() when spin_lock_irqsave() is called on this spinlock. The patch was tested on Clevo D4J, model D410J laptop, on the following hardware, without AGP kernel module loaded: # lspci -s 01:00.0 -n 01:00.0 0300: 1106:3108 (rev 01) # lspci -s 01:00.0 -v 01:00.0 VGA compatible controller: VIA Technologies, Inc. K8M800/K8N800/K8N800A [S3 UniChrome Pro] (rev 01) (prog-if 00 [VGA controller]) Subsystem: CLEVO/KAPOK Computer Device 4702 Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16 Memory at f000 (32-bit, prefetchable) [size=64M] Memory at d100 (32-bit, non-prefetchable) [size=16M] Expansion ROM at [disabled] Capabilities: [60] Power Management version 2 Capabilities: [70] AGP version 3.0 Signed-off-by: M?rton N?meth --- diff --git a/drivers/gpu/drm/via/via_map.c b/drivers/gpu/drm/via/via_map.c index 1f18225..c126182 100644 --- a/drivers/gpu/drm/via/via_map.c +++ b/drivers/gpu/drm/via/via_map.c @@ -100,12 +100,11 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset) if (dev_priv == NULL) return -ENOMEM; + idr_init(&dev_priv->object_idr); dev->dev_private = (void *)dev_priv; dev_priv->chipset = chipset; - idr_init(&dev->object_name_idr); - pci_set_master(dev->pdev); ret = drm_vblank_init(dev, 1);