[PATCH] drm: Validate requested virtual size against allocated fb size
On Mon, Mar 26, 2012 at 09:15:53PM +0100, Chris Wilson wrote: > mplayer -vo fbdev tries to create a screen that is twice as tall as the > allocated framebuffer for "doublebuffering". By default, and all in-tree > users, only sufficient memory is allocated and mapped to satisfy the > smallest framebuffer and the virtual size is no larger than the actual. > For these users, we should therefore reject any userspace request to > create a screen that requires a buffer larger than the framebuffer > originally allocated. > > References: https://bugs.freedesktop.org/show_bug.cgi?id=38138 > Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Cc: stable at kernel.org Given that this is user-exploitable (at least for userspace that tries to do stupid tricks with fbdev), I think this should go in through drm-fixes. Dave? -Daniel > --- > drivers/gpu/drm/drm_fb_helper.c |8 ++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > index 7740dd2..a0d6e89 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -559,9 +559,13 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo > *var, > return -EINVAL; > > /* Need to resize the fb object !!! */ > - if (var->bits_per_pixel > fb->bits_per_pixel || var->xres > fb->width > || var->yres > fb->height) { > + if (var->bits_per_pixel > fb->bits_per_pixel || > + var->xres > fb->width || var->yres > fb->height || > + var->xres_virtual > fb->width || var->yres_virtual > fb->height) { > DRM_DEBUG("fb userspace requested width/height/bpp is greater > than current fb " > - "object %dx%d-%d > %dx%d-%d\n", var->xres, var->yres, > var->bits_per_pixel, > + "request %dx%d-%d (virtual %dx%d) > %dx%d-%d\n", > + var->xres, var->yres, var->bits_per_pixel, > + var->xres_virtual, var->yres_virtual, > fb->width, fb->height, fb->bits_per_pixel); > return -EINVAL; > } > -- > 1.7.9.1 > > ___ > dri-devel mailing list > dri-devel at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Mail: daniel at ffwll.ch Mobile: +41 (0)79 365 57 48
[Bug 48137] video hangs every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 Michael Schmitt changed: What|Removed |Added Attachment #59320|0 |1 is obsolete|| --- Comment #2 from Michael Schmitt 2012-03-31 16:02:46 PDT --- Created attachment 59321 --> https://bugs.freedesktop.org/attachment.cgi?id=59321 Xorg.0.log without the kernel boot parameter -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 48137] video hangs every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 --- Comment #1 from Michael Schmitt 2012-03-31 15:56:37 PDT --- Created attachment 59320 --> https://bugs.freedesktop.org/attachment.cgi?id=59320 Xorg.0.log without the kernel boot parameter -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 48137] video hangs every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 Michael Schmitt changed: What|Removed |Added CC||tcwardrobe at gmail.com Summary|video hans every few|video hangs every few |seconds |seconds -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 48137] New: video hans every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 Bug #: 48137 Summary: video hans every few seconds Classification: Unclassified Product: DRI Version: XOrg CVS Platform: Other OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/Radeon AssignedTo: dri-devel at lists.freedesktop.org ReportedBy: tcwardrobe at gmail.com Created attachment 59319 --> https://bugs.freedesktop.org/attachment.cgi?id=59319 Xorg.0.log after setting the kernel boot parameter it doesn't matter if I try to play h264, xvid or flash-content, video hangs every few seconds. Booting with "drm_kms_helper.poll=0" fixes the issue here. System specs: AMD E-350 CPU in a Zotac Zbox Nano AD10 Plus with "VGA compatible controller [0300]: ATI Technologies Inc Wrestler [Radeon HD 6310] [1002:9802]" Software specs: Debian GNU/Linux "wheezy" (testing), Linux kernel 3.2.12 (Debian kernel image), Xserver 1.11.4, libdrm-radeon 2.4.30, mesa-utils 8.0.1, libgl1-mesa-dri 7.11.2. regards Michael -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 42727] radeon KMS with CRT TV
https://bugzilla.kernel.org/show_bug.cgi?id=42727 --- Comment #46 from Egor Y. Egorov 2012-04-01 04:52:22 --- Alex, where can I read the description of the registers for the rv570? -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 46796] [X800SE] Mouse cursor corruption when switching users
https://bugs.freedesktop.org/show_bug.cgi?id=46796 --- Comment #13 from Chris Rankin 2012-03-31 14:26:15 PDT --- Duplicate of #36769, perhaps? -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 48131] Very large 2D texture is sometimes corrupted
https://bugs.freedesktop.org/show_bug.cgi?id=48131 --- Comment #1 from Benoit Jacob 2012-03-31 12:40:44 PDT --- By the way, this is on Ubuntu 11.10, 64 bit, X.Org -- Gallium 0.4 on AMD RV710 -- 2.1 Mesa 7.11 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 48131] New: Very large 2D texture is sometimes corrupted
https://bugs.freedesktop.org/show_bug.cgi?id=48131 Bug #: 48131 Summary: Very large 2D texture is sometimes corrupted Classification: Unclassified Product: Mesa Version: unspecified Platform: Other OS/Version: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/R600 AssignedTo: dri-devel at lists.freedesktop.org ReportedBy: bjacob at mozilla.com This WebGL testcase just creates a huge blank texture and draws a quad with it: http://people.mozilla.org/~bjacob/webgltexture2D5k.html You should see only black. But here I occasionally see some corruption with vertical yellow stripes on a rectangular part of the image. Reloading the page a few times makes the problem go away. The testcase uses webgl.texImage2D with null pixel data, which causes the browser to calloc() a buffer and pass it to glTexImage2D. So it's not just an uninitialized texture. The application is doing what's right to properly initialize the texture with zero'd image data. If there is any risk that this might be exposing uninitialized texture memory, then please treat this as a high priority, as we'd have to find a work around. FWIW, on a different proprietary platform, this does expose video memory and forced us to artificially limit the max texture size to 4k. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 48137] video hangs every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 --- Comment #3 from Michael Schmitt 2012-03-31 17:33:28 PDT --- Created attachment 59323 --> https://bugs.freedesktop.org/attachment.cgi?id=59323 dmesg when booting with drm.debug=14 -- 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
[Bug 26891] Radeon KMS on Macs with EFI boot
https://bugs.freedesktop.org/show_bug.cgi?id=26891 --- Comment #17 from Chi-Thanh Christopher Nguyen 2012-03-31 09:39:33 PDT --- Nouveau allows to load vbios from image file now. http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?id=c9b07e9e85e5b7fe38c9f009967e8bed51d3760b -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 48137] video hangs every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 Michael Schmitt changed: What|Removed |Added Attachment #59320|0 |1 is obsolete|| --- Comment #2 from Michael Schmitt 2012-03-31 16:02:46 PDT --- Created attachment 59321 --> https://bugs.freedesktop.org/attachment.cgi?id=59321 Xorg.0.log without the kernel boot parameter -- 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
[Bug 48137] video hangs every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 --- Comment #1 from Michael Schmitt 2012-03-31 15:56:37 PDT --- Created attachment 59320 --> https://bugs.freedesktop.org/attachment.cgi?id=59320 Xorg.0.log without the kernel boot parameter -- 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
[Bug 48137] video hangs every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 Michael Schmitt changed: What|Removed |Added CC||tcwardr...@gmail.com Summary|video hans every few|video hangs every few |seconds |seconds -- 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
[Bug 48137] New: video hans every few seconds
https://bugs.freedesktop.org/show_bug.cgi?id=48137 Bug #: 48137 Summary: video hans every few seconds Classification: Unclassified Product: DRI Version: XOrg CVS Platform: Other OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/Radeon AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: tcwardr...@gmail.com Created attachment 59319 --> https://bugs.freedesktop.org/attachment.cgi?id=59319 Xorg.0.log after setting the kernel boot parameter it doesn't matter if I try to play h264, xvid or flash-content, video hangs every few seconds. Booting with "drm_kms_helper.poll=0" fixes the issue here. System specs: AMD E-350 CPU in a Zotac Zbox Nano AD10 Plus with "VGA compatible controller [0300]: ATI Technologies Inc Wrestler [Radeon HD 6310] [1002:9802]" Software specs: Debian GNU/Linux "wheezy" (testing), Linux kernel 3.2.12 (Debian kernel image), Xserver 1.11.4, libdrm-radeon 2.4.30, mesa-utils 8.0.1, libgl1-mesa-dri 7.11.2. regards Michael -- 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
[Bug 46796] [X800SE] Mouse cursor corruption when switching users
https://bugs.freedesktop.org/show_bug.cgi?id=46796 --- Comment #13 from Chris Rankin 2012-03-31 14:26:15 PDT --- Duplicate of #36769, perhaps? -- 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
Re: [PATCH] drm: Validate requested virtual size against allocated fb size
On Mon, Mar 26, 2012 at 09:15:53PM +0100, Chris Wilson wrote: > mplayer -vo fbdev tries to create a screen that is twice as tall as the > allocated framebuffer for "doublebuffering". By default, and all in-tree > users, only sufficient memory is allocated and mapped to satisfy the > smallest framebuffer and the virtual size is no larger than the actual. > For these users, we should therefore reject any userspace request to > create a screen that requires a buffer larger than the framebuffer > originally allocated. > > References: https://bugs.freedesktop.org/show_bug.cgi?id=38138 > Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Cc: sta...@kernel.org Given that this is user-exploitable (at least for userspace that tries to do stupid tricks with fbdev), I think this should go in through drm-fixes. Dave? -Daniel > --- > drivers/gpu/drm/drm_fb_helper.c |8 ++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > index 7740dd2..a0d6e89 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -559,9 +559,13 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo > *var, > return -EINVAL; > > /* Need to resize the fb object !!! */ > - if (var->bits_per_pixel > fb->bits_per_pixel || var->xres > fb->width > || var->yres > fb->height) { > + if (var->bits_per_pixel > fb->bits_per_pixel || > + var->xres > fb->width || var->yres > fb->height || > + var->xres_virtual > fb->width || var->yres_virtual > fb->height) { > DRM_DEBUG("fb userspace requested width/height/bpp is greater > than current fb " > - "object %dx%d-%d > %dx%d-%d\n", var->xres, var->yres, > var->bits_per_pixel, > + "request %dx%d-%d (virtual %dx%d) > %dx%d-%d\n", > + var->xres, var->yres, var->bits_per_pixel, > + var->xres_virtual, var->yres_virtual, > fb->width, fb->height, fb->bits_per_pixel); > return -EINVAL; > } > -- > 1.7.9.1 > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Mail: dan...@ffwll.ch Mobile: +41 (0)79 365 57 48 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH RFC] drm: support for rotated scanout
On Fri, Mar 30, 2012 at 05:59:32PM -0500, Rob Clark wrote: > From: Rob Clark > > For drivers that can support rotated scanout, the extra parameter > checking in drm-core, while nice, tends to get confused. To solve > this drivers can set the crtc or plane invert_dimensions field so > that the dimension checking takes into account the rotation that > the driver is performing. > --- > Note: RFC still mainly because I've only tested the CRTC rotation so > far.. still need to write some test code for plane rotation. > > drivers/gpu/drm/drm_crtc.c | 50 +-- > include/drm/drm_crtc.h |9 > 2 files changed, 43 insertions(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 0dff444..261c9bd 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -375,6 +375,7 @@ int drm_crtc_init(struct drm_device *dev, struct drm_crtc > *crtc, > > crtc->dev = dev; > crtc->funcs = funcs; > + crtc->invert_dimensions = false; > > mutex_lock(&dev->mode_config.mutex); > > @@ -609,6 +610,7 @@ int drm_plane_init(struct drm_device *dev, struct > drm_plane *plane, > plane->base.properties = &plane->properties; > plane->dev = dev; > plane->funcs = funcs; > + plane->invert_dimensions = false; > plane->format_types = kmalloc(sizeof(uint32_t) * format_count, > GFP_KERNEL); > if (!plane->format_types) { > @@ -1758,6 +1760,9 @@ int drm_mode_setplane(struct drm_device *dev, void > *data, > fb_width = fb->width << 16; > fb_height = fb->height << 16; > > + if (plane->invert_dimensions) > + swap(fb_width, fb_height); > + In my opinion the only sane way to specify this stuff is that the source coordinates are not transformed in any way. So you fetch the data from the fb based on the source coordinates, then apply all plane transformations (if any), and then apply all CRTC transformations (if any). > /* Make sure source coordinates are inside the fb. */ > if (plane_req->src_w > fb_width || > plane_req->src_x > fb_width - plane_req->src_w || > @@ -1856,6 +1861,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, > DRM_DEBUG_KMS("[CRTC:%d]\n", crtc->base.id); > > if (crtc_req->mode_valid) { > + int hdisplay, vdisplay; > /* If we have a mode we need a framebuffer. */ > /* If we pass -1, set the mode with the currently bound fb */ > if (crtc_req->fb_id == -1) { > @@ -1891,14 +1897,20 @@ int drm_mode_setcrtc(struct drm_device *dev, void > *data, > > drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); > > - if (mode->hdisplay > fb->width || > - mode->vdisplay > fb->height || > - crtc_req->x > fb->width - mode->hdisplay || > - crtc_req->y > fb->height - mode->vdisplay) { > - DRM_DEBUG_KMS("Invalid CRTC viewport %ux%u+%u+%u for fb > size %ux%u.\n", > - mode->hdisplay, mode->vdisplay, > - crtc_req->x, crtc_req->y, > - fb->width, fb->height); > + hdisplay = mode->hdisplay; > + vdisplay = mode->vdisplay; > + > + if (crtc->invert_dimensions) > + swap(hdisplay, vdisplay); > + > + if (hdisplay > fb->width || > + vdisplay > fb->height || > + crtc_req->x > fb->width - hdisplay || > + crtc_req->y > fb->height - vdisplay) { > + DRM_DEBUG_KMS("Invalid fb size %ux%u for CRTC viewport > %ux%u+%d+%d%s.\n", > + fb->width, fb->height, > + hdisplay, vdisplay, crtc_req->x, > crtc_req->y, > + crtc->invert_dimensions ? " (inverted)" : > ""); I would perhaps just stick more details about the transformations into drm_crtc, but we will anyway require a better mode setting API. So perhaps this is an OK intermediate solution. > ret = -ENOSPC; > goto out; > } -- Ville Syrjälä syrj...@sci.fi http://www.sci.fi/~syrjala/ ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 5/7] mm, drm/udl: fixup vma flags on mmap
There should be VM_MIXEDMAP, not VM_PFNMAP, because udl_gem_fault() inserts pages via vm_insert_page(). Other drm/gem drivers already do this. Signed-off-by: Konstantin Khlebnikov Cc: Dave Airlie Cc: dri-devel at lists.freedesktop.org --- drivers/gpu/drm/udl/udl_drv.c |2 +- drivers/gpu/drm/udl/udl_drv.h |1 + drivers/gpu/drm/udl/udl_gem.c | 14 ++ 3 files changed, 16 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index 5340c5f..5367390 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -47,7 +47,7 @@ static struct vm_operations_struct udl_gem_vm_ops = { static const struct file_operations udl_driver_fops = { .owner = THIS_MODULE, .open = drm_open, - .mmap = drm_gem_mmap, + .mmap = udl_drm_gem_mmap, .poll = drm_poll, .read = drm_read, .unlocked_ioctl = drm_ioctl, diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index 1612954..96820d0 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -121,6 +121,7 @@ struct udl_gem_object *udl_gem_alloc_object(struct drm_device *dev, int udl_gem_vmap(struct udl_gem_object *obj); void udl_gem_vunmap(struct udl_gem_object *obj); +int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); int udl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); int udl_handle_damage(struct udl_framebuffer *fb, int x, int y, diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c index 852642d..92f19ef 100644 --- a/drivers/gpu/drm/udl/udl_gem.c +++ b/drivers/gpu/drm/udl/udl_gem.c @@ -71,6 +71,20 @@ int udl_dumb_destroy(struct drm_file *file, struct drm_device *dev, return drm_gem_handle_delete(file, handle); } +int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) +{ + int ret; + + ret = drm_gem_mmap(filp, vma); + if (ret) + return ret; + + vma->vm_flags &= ~VM_PFNMAP; + vma->vm_flags |= VM_MIXEDMAP; + + return ret; +} + int udl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct udl_gem_object *obj = to_udl_bo(vma->vm_private_data);
[Bug 48131] Very large 2D texture is sometimes corrupted
https://bugs.freedesktop.org/show_bug.cgi?id=48131 --- Comment #1 from Benoit Jacob 2012-03-31 12:40:44 PDT --- By the way, this is on Ubuntu 11.10, 64 bit, X.Org -- Gallium 0.4 on AMD RV710 -- 2.1 Mesa 7.11 -- 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
[Bug 48131] New: Very large 2D texture is sometimes corrupted
https://bugs.freedesktop.org/show_bug.cgi?id=48131 Bug #: 48131 Summary: Very large 2D texture is sometimes corrupted Classification: Unclassified Product: Mesa Version: unspecified Platform: Other OS/Version: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/R600 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: bja...@mozilla.com This WebGL testcase just creates a huge blank texture and draws a quad with it: http://people.mozilla.org/~bjacob/webgltexture2D5k.html You should see only black. But here I occasionally see some corruption with vertical yellow stripes on a rectangular part of the image. Reloading the page a few times makes the problem go away. The testcase uses webgl.texImage2D with null pixel data, which causes the browser to calloc() a buffer and pass it to glTexImage2D. So it's not just an uninitialized texture. The application is doing what's right to properly initialize the texture with zero'd image data. If there is any risk that this might be exposing uninitialized texture memory, then please treat this as a high priority, as we'd have to find a work around. FWIW, on a different proprietary platform, this does expose video memory and forced us to artificially limit the max texture size to 4k. -- 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
[Bug 43768] [i915g] src/gallium/drivers/i915/i915_fpc_translate.c:1101:i915_translate_token: Assertion `ifs->constant_flags[i] == 0x0' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=43768 Julien Nabet changed: What|Removed |Added CC||ranselm at gwdg.de --- Comment #2 from Julien Nabet 2012-03-31 02:55:16 PDT --- *** Bug 47569 has been marked as a duplicate of this bug. *** -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug.
[Bug 26891] Radeon KMS on Macs with EFI boot
https://bugs.freedesktop.org/show_bug.cgi?id=26891 --- Comment #17 from Chi-Thanh Christopher Nguyen 2012-03-31 09:39:33 PDT --- Nouveau allows to load vbios from image file now. http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?id=c9b07e9e85e5b7fe38c9f009967e8bed51d3760b -- 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
[Bug 43768] [i915g] src/gallium/drivers/i915/i915_fpc_translate.c:1101:i915_translate_token: Assertion `ifs->constant_flags[i] == 0x0' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=43768 Julien Nabet changed: What|Removed |Added CC||rans...@gwdg.de --- Comment #2 from Julien Nabet 2012-03-31 02:55:16 PDT --- *** Bug 47569 has been marked as a duplicate of this bug. *** -- 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 5/7] mm, drm/udl: fixup vma flags on mmap
There should be VM_MIXEDMAP, not VM_PFNMAP, because udl_gem_fault() inserts pages via vm_insert_page(). Other drm/gem drivers already do this. Signed-off-by: Konstantin Khlebnikov Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/udl/udl_drv.c |2 +- drivers/gpu/drm/udl/udl_drv.h |1 + drivers/gpu/drm/udl/udl_gem.c | 14 ++ 3 files changed, 16 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index 5340c5f..5367390 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -47,7 +47,7 @@ static struct vm_operations_struct udl_gem_vm_ops = { static const struct file_operations udl_driver_fops = { .owner = THIS_MODULE, .open = drm_open, - .mmap = drm_gem_mmap, + .mmap = udl_drm_gem_mmap, .poll = drm_poll, .read = drm_read, .unlocked_ioctl = drm_ioctl, diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index 1612954..96820d0 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -121,6 +121,7 @@ struct udl_gem_object *udl_gem_alloc_object(struct drm_device *dev, int udl_gem_vmap(struct udl_gem_object *obj); void udl_gem_vunmap(struct udl_gem_object *obj); +int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); int udl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); int udl_handle_damage(struct udl_framebuffer *fb, int x, int y, diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c index 852642d..92f19ef 100644 --- a/drivers/gpu/drm/udl/udl_gem.c +++ b/drivers/gpu/drm/udl/udl_gem.c @@ -71,6 +71,20 @@ int udl_dumb_destroy(struct drm_file *file, struct drm_device *dev, return drm_gem_handle_delete(file, handle); } +int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) +{ + int ret; + + ret = drm_gem_mmap(filp, vma); + if (ret) + return ret; + + vma->vm_flags &= ~VM_PFNMAP; + vma->vm_flags |= VM_MIXEDMAP; + + return ret; +} + int udl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct udl_gem_object *obj = to_udl_bo(vma->vm_private_data); ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel