All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
	linux-kernel@vger.kernel.org
Cc: David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/display: Select DP helper for DRM_DP_AUX_CHARDEV and DRM_DP_CEC
Date: Thu, 28 Apr 2022 10:04:32 +0200	[thread overview]
Message-ID: <cdad47d0-939d-9eda-feae-78cf204a0ae6@suse.de> (raw)
In-Reply-To: <1d456654-6d06-ef35-b9a0-519db7d5b35e@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 3152 bytes --]

Hi

Am 28.04.22 um 09:52 schrieb Javier Martinez Canillas:
> On 4/28/22 09:45, Thomas Zimmermann wrote:
> 
> [snip]
> 
>>>> You cannot select DISPLAY_DP_HELPER without DISPLAY_HELPER.
>>>>
>>>
>>> That was my original thought as well and what did in v1, but then I noticed
>>> that doing that it would force DRM_DISPLAY_HELPER to be set as built-in and
>>> not allow to be built as a module.
>>
>> It was a rhetorical only. I didn't mean to actually set DISPLAY_HELPER.
>>
> 
> Ah, sorry for misunderstanding.
> 
>>>    
>>>> Can't you simply make it depend on DISPLAY_DP_HELPER.  The menu entry
>>>> will show up as soon as there's a driver that selcets DISPLAY_DP_HELPER.
>>>>
>>>
>>> I could but then that means that once won't be able to select these two config
>>> options unless some enable symbol selects DRM_DISPLAY_DP_HELPER.
>>>
>>> In my opinion, DRM_DP_AUX_CHARDEV and DRM_DP_CEC are different than all other
>>> options that select DRM_DISPLAY_DP_HELPER, since those are drivers and want to
>>> have both DRM_DISPLAY_DP_HELPER and DRM_DISPLAY_HELPER set.
>>>
>>> But DRM_DP_AUX_CHARDEV and DRM_DP_CEC are just included in drm_display_helper.o
>>> if enabled, and depend on symbols that are present if CONFIG_DRM_DISPLAY_DP_HELPER
>>> is enabled. So just need the latter, if DRM_DISPLAY_HELPER is not enabled then it
>>> will just be a no-op.
>>>
>>> Having written that though I noticed that a "depends on DRM_DISPLAY_HELPER" makes
>>> sense. If you agree I can add it and post a v3.
>>
>> Yes please.  These options enable features of the DP code. If there's no
>> driver with DP, it doesn't make sense to allow them.
>>
>> I know that there could be an odd situation where userspace might not
>> have DP, but still wants the chardev file of aux bus.  But that
>> situation existed already when the code was located within KMS helpers.
>>
> 
> Agreed.
> 
>>>
>>> Now, pondering more about this issue, probably the most correct thing to do is for
>>> the drivers that make use of the symbols exported by DRM_DP_{AUX_CHARDEV,CEC} to
>>> select these. What do you think ?
>>
>> That's not considered good style. Select should not be used for anything
>> that is user-configurable. [1]
>>
> 
> Right. So giving even more thought to this, now I think that we should just include
> drm_dp_aux_dev.o, drm_dp_cec.o (and probably drm_dp_aux_bus.o?) unconditionally to
> drm_display_helper-$(CONFIG_DRM_DISPLAY_DP_HELPER).
> 
> After all, these are not big objects and drm_display_helper can now be built as module.
> 
> I don't see that much value to have separate user-configurable config options...
> 

I don't know the side effects of this. We're exporting another device 
file after all.

For know I'd make them depend on DRM_DISPLAY_DP_HELPER. If someone 
complains we can revert and fix the linker error by adding stub 
functions for the missing symbols.

Best regards
Thomas

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2022-04-28  8:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 21:55 [PATCH v2] drm/display: Select DP helper for DRM_DP_AUX_CHARDEV and DRM_DP_CEC Javier Martinez Canillas
2022-04-27 21:55 ` Javier Martinez Canillas
2022-04-28  7:02 ` Thomas Zimmermann
2022-04-28  7:02   ` Thomas Zimmermann
2022-04-28  7:26   ` Javier Martinez Canillas
2022-04-28  7:26     ` Javier Martinez Canillas
2022-04-28  7:45     ` Thomas Zimmermann
2022-04-28  7:52       ` Javier Martinez Canillas
2022-04-28  8:04         ` Thomas Zimmermann [this message]
2022-04-28  8:13           ` Javier Martinez Canillas
2022-04-28  8:13             ` Javier Martinez Canillas
2022-04-28  8:05         ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cdad47d0-939d-9eda-feae-78cf204a0ae6@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.