Re: [PATCH 0/6] drm: Give crtcs and planes actual names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 17 Nov 2015, Daniel Vetter <daniel@xxxxxxxx> wrote:
> On Thu, Nov 12, 2015 at 06:52:20PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote:
>> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>> 
>> I got sick and tired of staring at the line noise produced by drm.debug=0x1e,
>> so I decided to give the crtcs and planes human readable names. Each driver
>> can give whatever names it wants, and for i915 I gave something that makes
>> some sense w.r.t. to the spec.
>> 
>> The only magic gotcha here is that if the driver dynamically allocates the
>> name, it must be careful around drm_{crtc,plane}_cleanup() cause those
>> guys just memset the entire structure to 0. I didn't want to put the kfree()
>> into the cleanup functions to avoid having to kstrdup("") in the fallback
>> case or forcing drivers to always use a dynamic allocation.
>
> I avoiding the kstrdup("") is a bit a hack, especially since we could put
> somethinig useful in there like "idx-%i", drm_plane_index(). The index is
> used by a bunch of things (both internally and in ioctl structs), so
> pretty handy.

Find the latest version of the series first. ;)

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux