drm/fb_helper: prevent some troubles waiting to happen

Daniel Vetter daniel at ffwll.ch
Wed Oct 26 00:41:24 PDT 2011


On Tue, Oct 25, 2011 at 09:57:17PM -0400, Ilija Hadzic wrote:
> The following two patches address potential problems that I 
> called "troubles waiting to happen" in this note
> http://lists.freedesktop.org/archives/dri-devel/2011-October/015412.html
> 
> I didn't hear anyone take on my question, so I figured I would just send
> the patches. I tested the patches on a variety of AMD cards that I have.
> I don't have other GPUs handy.

I've quickly checked current callsites of drm_fb_helper_init and I think
you can just kill the two arguments crtc_count and max_conn_count. All
drivers pass in the actual crtc count for the first and some midly bogus
constant for the latter.

i915 and radeon also use that constant to attach some struct drm_connector
* pointers to the end of their crtc, which looks rather unused. You might
want to kill that, too.
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48


More information about the dri-devel mailing list