From: Jani Nikula <jani.nikula@linux.intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
daniel@ffwll.ch, airlied@linux.ie,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
lyude@redhat.com
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 7/8] drm/display: Move HDMI helpers into display-helper module
Date: Thu, 07 Apr 2022 10:34:40 +0300 [thread overview]
Message-ID: <87wng15otr.fsf@intel.com> (raw)
In-Reply-To: <871qy973i6.fsf@intel.com>
On Thu, 07 Apr 2022, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Wed, 06 Apr 2022, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>> Hi
>>
>> Am 30.03.22 um 12:35 schrieb Jani Nikula:
>>> On Tue, 22 Mar 2022, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>>> diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
>>>> index 144c495b99c4..e6e9e4557067 100644
>>>> --- a/include/drm/drm_edid.h
>>>> +++ b/include/drm/drm_edid.h
>>>> @@ -391,33 +391,6 @@ drm_load_edid_firmware(struct drm_connector *connector)
>>>>
>>>> bool drm_edid_are_equal(const struct edid *edid1, const struct edid *edid2);
>>>>
>>>> -int
>>>> -drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>>>> - const struct drm_connector *connector,
>>>> - const struct drm_display_mode *mode);
>>>> -int
>>>> -drm_hdmi_vendor_infoframe_from_display_mode(struct hdmi_vendor_infoframe *frame,
>>>> - const struct drm_connector *connector,
>>>> - const struct drm_display_mode *mode);
>>>> -
>>>> -void
>>>> -drm_hdmi_avi_infoframe_colorimetry(struct hdmi_avi_infoframe *frame,
>>>> - const struct drm_connector_state *conn_state);
>>>> -
>>>> -void
>>>> -drm_hdmi_avi_infoframe_bars(struct hdmi_avi_infoframe *frame,
>>>> - const struct drm_connector_state *conn_state);
>>>> -
>>>> -void
>>>> -drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame,
>>>> - const struct drm_connector *connector,
>>>> - const struct drm_display_mode *mode,
>>>> - enum hdmi_quantization_range rgb_quant_range);
>>>> -
>>>> -int
>>>> -drm_hdmi_infoframe_set_hdr_metadata(struct hdmi_drm_infoframe *frame,
>>>> - const struct drm_connector_state *conn_state);
>>>> -
>>>> /**
>>>> * drm_eld_mnl - Get ELD monitor name length in bytes.
>>>> * @eld: pointer to an eld memory structure with mnl set
>>>> @@ -587,6 +560,10 @@ void drm_edid_get_monitor_name(struct edid *edid, char *name,
>>>> struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
>>>> int hsize, int vsize, int fresh,
>>>> bool rb);
>>>> +
>>>> +u8 drm_match_hdmi_mode(const struct drm_display_mode *to_match);
>>>> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
>>>> +enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8 video_code);
>>>
>>> I think these were fine as static, but not really great interfaces to
>>> export. There's zero input checking on the vic in the latter, because
>>> internally we could be sure they were fine.
>>
>> I see. If nothing else, HDMI could be removed from the patchset. OTOH
>> having these HDMI functions as part of the edid code doesn't seem right
>> either.
To clarify, I think the HDMI functionality should probably be
moved. It's just the new interfaces I'm worried about.
BR,
Jani.
>>
>>>
>>> I also wish we could limit the usage to the module you're adding; this
>>> is now available to all drivers which should be discouraged.
>>
>> Why is that discouraged? Quite a few drivers use these interfaces.
>
> No driver needed to directly use the functions you're now additionally
> exporting from drm_edid.c. I'd hope no driver starts to use them either.
>
> BR,
> Jani.
>
>
>
>>
>> Best regards
>> Thomas
>>>
>>>
>>> BR,
>>> Jani.
>>>
>>>
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-04-07 7:34 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 19:27 [PATCH 0/8] drm: Introduce display-helper library Thomas Zimmermann
2022-03-22 19:27 ` [PATCH 1/8] drm: Put related statements next to each other in Makefile Thomas Zimmermann
2022-03-30 8:13 ` Jani Nikula
2022-03-30 8:13 ` Javier Martinez Canillas
2022-03-22 19:27 ` [PATCH 2/8] drm: Rename dp/ to display/ Thomas Zimmermann
2022-03-30 9:04 ` Javier Martinez Canillas
2022-03-30 9:24 ` Thomas Zimmermann
2022-03-30 13:52 ` Alex Deucher
2022-03-22 19:27 ` [PATCH 3/8] drm/display: Introduce a DRM display-helper module Thomas Zimmermann
2022-03-30 9:23 ` Javier Martinez Canillas
2022-03-30 10:32 ` Thomas Zimmermann
2022-03-31 6:57 ` Javier Martinez Canillas
2022-04-06 19:08 ` Thomas Zimmermann
2022-04-07 7:43 ` Javier Martinez Canillas
2022-04-07 8:03 ` Thomas Zimmermann
2022-04-07 8:45 ` Jani Nikula
2022-04-18 18:13 ` Thomas Zimmermann
2022-03-22 19:27 ` [PATCH 4/8] drm/display: Split DisplayPort header into core and helper Thomas Zimmermann
2022-04-01 7:18 ` Javier Martinez Canillas
2022-03-22 19:27 ` [PATCH 5/8] drm/display: Move DSC header and helpers into display-helper module Thomas Zimmermann
2022-04-01 7:23 ` Javier Martinez Canillas
2022-03-22 19:27 ` [PATCH 6/8] drm/display: Move HDCP " Thomas Zimmermann
2022-03-30 7:12 ` Jani Nikula
2022-03-30 8:05 ` Thomas Zimmermann
2022-04-01 8:23 ` Javier Martinez Canillas
2022-03-22 19:27 ` [PATCH 7/8] drm/display: Move HDMI " Thomas Zimmermann
2022-03-30 10:35 ` Jani Nikula
2022-04-06 19:47 ` Thomas Zimmermann
2022-04-07 7:32 ` Jani Nikula
2022-04-07 7:34 ` Jani Nikula [this message]
2022-04-07 7:44 ` Thomas Zimmermann
2022-03-22 19:27 ` [PATCH 8/8] drm/display: Move SCDC helpers into display-helper library Thomas Zimmermann
2022-03-29 19:26 ` [PATCH 0/8] drm: Introduce " Lyude Paul
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=87wng15otr.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox