[PATCH] mgag200: some cleanup and a fix for corrupted output
On Thu, Mar 7, 2013 at 4:51 AM, Christopher Harvey wrote: > On Tue, Feb 26, 2013 at 10:52:55AM -0500, Christopher Harvey wrote: >> Patches 1 to 4 are just cleanup. Maybe these should should be rolled >> into one patch? >> >> Patch 5 is a bit more complicated. >> On cards with very little video memory, (e.g 8MB) higher resolutions >> at 32bit framebuffer depths will get corrupted because the required >> memory is larger than what the framebuffer has. DRM has "max_height" >> and "max_width" but no "max_bytes" for limiting resolutions, so the >> patch is a little hacky. The first for loop tries to associate a >> connector with the mode being tested. From the connector I can get the >> bpp if the user specified one on the video= commandline. After that I >> do 2 things: >> 1) Invalidate the requested mode from the video= parameter >> 2) Return MODE_BAD if the framebuffer would be too large >> I feel this patch plays with structures it shouldn't have to touch to >> get the bpp. An alternative fix would be to include a "max_bytes" in >> the DRM core and then do these checks there. >> >> I'm also wondering, did I miss the 3.9.0 merge window? >> >> Thanks, >> >> Christopher Harvey (5): >> drm/mgag200: Cleanup: Remove pointless call to drm_fb_get_bpp_depth >> drm/mgag200: Cleanup: 'fbdev_list' in 'struct mga_fbdev' is not used >> drm/mgag200: Cleanup: Pass driver specific mga_device in driver >> functions >> drm/mgag200: Cleanup: Remove extra variable assigns >> drm/mgag200: Reject modes that are too big for VRAM >> >> drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - >> drivers/gpu/drm/mgag200/mgag200_fb.c | 3 --- >> drivers/gpu/drm/mgag200/mgag200_main.c | 2 -- >> drivers/gpu/drm/mgag200/mgag200_mode.c | 34 >> ++ >> 4 files changed, 30 insertions(+), 10 deletions(-) >> >> -- >> 1.7.12.4 >> > > Ping. > > I've got more patches queuing up. Should I re-submit these along with > the new ones? > > So far I've only gotten commit message feedback. > Sorry been off sick, and this fell off my radar, I'll get to it today, the first 4 seem fine, I'll check the last one today., they all look like fixes so I can probably merge them at any time. Thanks, Dave.
[PATCH] mgag200: some cleanup and a fix for corrupted output
On Tue, Feb 26, 2013 at 10:52:55AM -0500, Christopher Harvey wrote: > Patches 1 to 4 are just cleanup. Maybe these should should be rolled > into one patch? > > Patch 5 is a bit more complicated. > On cards with very little video memory, (e.g 8MB) higher resolutions > at 32bit framebuffer depths will get corrupted because the required > memory is larger than what the framebuffer has. DRM has "max_height" > and "max_width" but no "max_bytes" for limiting resolutions, so the > patch is a little hacky. The first for loop tries to associate a > connector with the mode being tested. From the connector I can get the > bpp if the user specified one on the video= commandline. After that I > do 2 things: > 1) Invalidate the requested mode from the video= parameter > 2) Return MODE_BAD if the framebuffer would be too large > I feel this patch plays with structures it shouldn't have to touch to > get the bpp. An alternative fix would be to include a "max_bytes" in > the DRM core and then do these checks there. > > I'm also wondering, did I miss the 3.9.0 merge window? > > Thanks, > > Christopher Harvey (5): > drm/mgag200: Cleanup: Remove pointless call to drm_fb_get_bpp_depth > drm/mgag200: Cleanup: 'fbdev_list' in 'struct mga_fbdev' is not used > drm/mgag200: Cleanup: Pass driver specific mga_device in driver > functions > drm/mgag200: Cleanup: Remove extra variable assigns > drm/mgag200: Reject modes that are too big for VRAM > > drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - > drivers/gpu/drm/mgag200/mgag200_fb.c | 3 --- > drivers/gpu/drm/mgag200/mgag200_main.c | 2 -- > drivers/gpu/drm/mgag200/mgag200_mode.c | 34 > ++ > 4 files changed, 30 insertions(+), 10 deletions(-) > > -- > 1.7.12.4 > Ping. I've got more patches queuing up. Should I re-submit these along with the new ones? So far I've only gotten commit message feedback. -Chris
Re: [PATCH] mgag200: some cleanup and a fix for corrupted output
On Tue, Feb 26, 2013 at 10:52:55AM -0500, Christopher Harvey wrote: Patches 1 to 4 are just cleanup. Maybe these should should be rolled into one patch? Patch 5 is a bit more complicated. On cards with very little video memory, (e.g 8MB) higher resolutions at 32bit framebuffer depths will get corrupted because the required memory is larger than what the framebuffer has. DRM has max_height and max_width but no max_bytes for limiting resolutions, so the patch is a little hacky. The first for loop tries to associate a connector with the mode being tested. From the connector I can get the bpp if the user specified one on the video= commandline. After that I do 2 things: 1) Invalidate the requested mode from the video= parameter 2) Return MODE_BAD if the framebuffer would be too large I feel this patch plays with structures it shouldn't have to touch to get the bpp. An alternative fix would be to include a max_bytes in the DRM core and then do these checks there. I'm also wondering, did I miss the 3.9.0 merge window? Thanks, Christopher Harvey (5): drm/mgag200: Cleanup: Remove pointless call to drm_fb_get_bpp_depth drm/mgag200: Cleanup: 'fbdev_list' in 'struct mga_fbdev' is not used drm/mgag200: Cleanup: Pass driver specific mga_device in driver functions drm/mgag200: Cleanup: Remove extra variable assigns drm/mgag200: Reject modes that are too big for VRAM drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - drivers/gpu/drm/mgag200/mgag200_fb.c | 3 --- drivers/gpu/drm/mgag200/mgag200_main.c | 2 -- drivers/gpu/drm/mgag200/mgag200_mode.c | 34 ++ 4 files changed, 30 insertions(+), 10 deletions(-) -- 1.7.12.4 Ping. I've got more patches queuing up. Should I re-submit these along with the new ones? So far I've only gotten commit message feedback. -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] mgag200: some cleanup and a fix for corrupted output
On Thu, Mar 7, 2013 at 4:51 AM, Christopher Harvey char...@matrox.com wrote: On Tue, Feb 26, 2013 at 10:52:55AM -0500, Christopher Harvey wrote: Patches 1 to 4 are just cleanup. Maybe these should should be rolled into one patch? Patch 5 is a bit more complicated. On cards with very little video memory, (e.g 8MB) higher resolutions at 32bit framebuffer depths will get corrupted because the required memory is larger than what the framebuffer has. DRM has max_height and max_width but no max_bytes for limiting resolutions, so the patch is a little hacky. The first for loop tries to associate a connector with the mode being tested. From the connector I can get the bpp if the user specified one on the video= commandline. After that I do 2 things: 1) Invalidate the requested mode from the video= parameter 2) Return MODE_BAD if the framebuffer would be too large I feel this patch plays with structures it shouldn't have to touch to get the bpp. An alternative fix would be to include a max_bytes in the DRM core and then do these checks there. I'm also wondering, did I miss the 3.9.0 merge window? Thanks, Christopher Harvey (5): drm/mgag200: Cleanup: Remove pointless call to drm_fb_get_bpp_depth drm/mgag200: Cleanup: 'fbdev_list' in 'struct mga_fbdev' is not used drm/mgag200: Cleanup: Pass driver specific mga_device in driver functions drm/mgag200: Cleanup: Remove extra variable assigns drm/mgag200: Reject modes that are too big for VRAM drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - drivers/gpu/drm/mgag200/mgag200_fb.c | 3 --- drivers/gpu/drm/mgag200/mgag200_main.c | 2 -- drivers/gpu/drm/mgag200/mgag200_mode.c | 34 ++ 4 files changed, 30 insertions(+), 10 deletions(-) -- 1.7.12.4 Ping. I've got more patches queuing up. Should I re-submit these along with the new ones? So far I've only gotten commit message feedback. Sorry been off sick, and this fell off my radar, I'll get to it today, the first 4 seem fine, I'll check the last one today., they all look like fixes so I can probably merge them at any time. Thanks, Dave. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] mgag200: some cleanup and a fix for corrupted output
Patches 1 to 4 are just cleanup. Maybe these should should be rolled into one patch? Patch 5 is a bit more complicated. On cards with very little video memory, (e.g 8MB) higher resolutions at 32bit framebuffer depths will get corrupted because the required memory is larger than what the framebuffer has. DRM has "max_height" and "max_width" but no "max_bytes" for limiting resolutions, so the patch is a little hacky. The first for loop tries to associate a connector with the mode being tested. From the connector I can get the bpp if the user specified one on the video= commandline. After that I do 2 things: 1) Invalidate the requested mode from the video= parameter 2) Return MODE_BAD if the framebuffer would be too large I feel this patch plays with structures it shouldn't have to touch to get the bpp. An alternative fix would be to include a "max_bytes" in the DRM core and then do these checks there. I'm also wondering, did I miss the 3.9.0 merge window? Thanks, Christopher Harvey (5): drm/mgag200: Cleanup: Remove pointless call to drm_fb_get_bpp_depth drm/mgag200: Cleanup: 'fbdev_list' in 'struct mga_fbdev' is not used drm/mgag200: Cleanup: Pass driver specific mga_device in driver functions drm/mgag200: Cleanup: Remove extra variable assigns drm/mgag200: Reject modes that are too big for VRAM drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - drivers/gpu/drm/mgag200/mgag200_fb.c | 3 --- drivers/gpu/drm/mgag200/mgag200_main.c | 2 -- drivers/gpu/drm/mgag200/mgag200_mode.c | 34 ++ 4 files changed, 30 insertions(+), 10 deletions(-) -- 1.7.12.4
[PATCH] mgag200: some cleanup and a fix for corrupted output
Patches 1 to 4 are just cleanup. Maybe these should should be rolled into one patch? Patch 5 is a bit more complicated. On cards with very little video memory, (e.g 8MB) higher resolutions at 32bit framebuffer depths will get corrupted because the required memory is larger than what the framebuffer has. DRM has max_height and max_width but no max_bytes for limiting resolutions, so the patch is a little hacky. The first for loop tries to associate a connector with the mode being tested. From the connector I can get the bpp if the user specified one on the video= commandline. After that I do 2 things: 1) Invalidate the requested mode from the video= parameter 2) Return MODE_BAD if the framebuffer would be too large I feel this patch plays with structures it shouldn't have to touch to get the bpp. An alternative fix would be to include a max_bytes in the DRM core and then do these checks there. I'm also wondering, did I miss the 3.9.0 merge window? Thanks, Christopher Harvey (5): drm/mgag200: Cleanup: Remove pointless call to drm_fb_get_bpp_depth drm/mgag200: Cleanup: 'fbdev_list' in 'struct mga_fbdev' is not used drm/mgag200: Cleanup: Pass driver specific mga_device in driver functions drm/mgag200: Cleanup: Remove extra variable assigns drm/mgag200: Reject modes that are too big for VRAM drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - drivers/gpu/drm/mgag200/mgag200_fb.c | 3 --- drivers/gpu/drm/mgag200/mgag200_main.c | 2 -- drivers/gpu/drm/mgag200/mgag200_mode.c | 34 ++ 4 files changed, 30 insertions(+), 10 deletions(-) -- 1.7.12.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel