[PATCH] drm/hisilicon: Use drm_connector_register_all

Emil Velikov emil.l.velikov at gmail.com
Fri May 6 13:40:30 UTC 2016


On 6 May 2016 at 09:39, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Fri, May 06, 2016 at 09:37:25AM +0100, Chris Wilson wrote:
>> On Fri, May 06, 2016 at 10:28:41AM +0200, Daniel Vetter wrote:
>> > Also, the unbind function is totally not sufficient, and it's calling
>> > the deprecated drm_put_dev.
>>
Pretty much the example that I was thinking about when I said "use
check-in cocci scripts". The driver was done ~2 weeks before the
drm_connect_{un,}register_all helpers.

>> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
>> index 360b2a74e1ef..7efc0b477e38 100644
>> --- a/include/drm/drmP.h
>> +++ b/include/drm/drmP.h
>> @@ -1032,7 +1032,7 @@ extern void drm_vblank_post_modeset(struct drm_device *dev, unsigned int pipe);
>>  extern struct drm_master *drm_master_get(struct drm_master *master);
>>  extern void drm_master_put(struct drm_master **master);
>>
>> -extern void drm_put_dev(struct drm_device *dev);
>> +__deprecated extern void drm_put_dev(struct drm_device *dev);
>>  extern void drm_unplug_dev(struct drm_device *dev);
>>  extern unsigned int drm_debug;
>>  extern bool drm_atomic;
>>
>> And you probably should markup all the others that are now deprecated and
>> being phased out.
>>
>> Maybe behind drm_deprecated so that the spam is hidden behind another
>> kconfig option rather than enabled-by-buildbots?
>
> I thought about this, but the problem is that we still have plenty drivers
> using them. And hiding behind a build option is a bit meh, or at least
> we'd need me and Dave to enable that option to make sure nothing slips
> through.
>
> Dave, do you think such an option would be useful? You'd need to integrate
> it into your build testing when pulling drivers to make sure we catch it
> all?
>
Another interesting topic that I might have mentioned ;-)

About the defaults on such a toggle:
 - enabled, shouldn't cause too much spam as the __deprecated
warnings, are off by default.
Pros: Inspire people (maintainers, others) to cleanup the low hanging fruit.
Cons: Might annoy Dave/Daniel and people looking at buildbot logs,
when they set the latter.

 - disabled, temporary enabled on pull req.
Pros: 'Status check' and a list of things to poke driver maintainers.
Cons: Maintainers might not have both toggles enabled, thus will
likely miss things.


Whichever it is it's up-to you guys. Personally I think that we do
want to annotate symbols as __deprecated with or without the extra
configure (drm toggle).

Regards,
Emil


More information about the dri-devel mailing list