[PATCH 02/12] drm/pci: Hide legacy PCI functions from non-legacy code

Thomas Zimmermann tzimmermann at suse.de
Tue Dec 3 11:27:37 UTC 2019


Hi Emil

Am 03.12.19 um 12:09 schrieb Emil Velikov:
> On Tue, 3 Dec 2019 at 11:06, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>
>> Hi Thomas,
>>
>> On Tue, 3 Dec 2019 at 10:04, Thomas Zimmermann <tzimmermann at suse.de> wrote:
>>>
>>> Declarations of drm_legacy_pci_{init,exit}() are being moved to
>>> drm_legacy.h. CONFIG_DRM_LEGACY protects the implementation.
>>>
>>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>>> ---
>>>  drivers/gpu/drm/drm_pci.c |  4 ++++
>>>  include/drm/drm_legacy.h  | 29 ++++++++++++++++++++++++++++-
>>>  include/drm/drm_pci.h     | 15 ---------------
>>>  3 files changed, 32 insertions(+), 16 deletions(-)
>>>
>> How about we make this patch 01/12, this way we can avoid the current
>> case of - add code only to be moved in next patch.

I tried. But before patch [01/12] drm_legacy_pci_init() in drm_pci.c is
protected by CONFIG_PCI, while drm_legacy_pci_exit() isn't. So moving
patch [02/12] first, makes things even more ugly.

>>
>> As always - couple of ideas for follow-up cleanups.
>>  - drm_irq_by_busid() is legacy codebase (see the DRIVER_LEGACY check
>> at the top). How about we give it a _legacy_ name?
>>  - WE HAVE A FEW driver_features
> 
> Pardon there, the last one should read:
> - We have a few instances that read driver_features directly, instead
> of using the drm_core_check_feature() helper.
> Might be a good idea to address those.

This specific patchset isn't about legacy, but PCI functions. But, yeah,
these things are good follow-up changes. If I need something quick and
simple to do before Christmas holidays... :)

Best regards
Thomas

> 
> Just some nitpicks noticed while skimming through. It's not a
> requirement by any means.
> 
> HTH
> Emil
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20191203/acb1b5cb/attachment.sig>


More information about the dri-devel mailing list