From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v6 06/12] drm/edid: refactor _drm_edid_connector_update() and rename
Date: Tue, 20 Dec 2022 15:02:33 +0200 [thread overview]
Message-ID: <Y6GyadM7DS6Z+Hvd@intel.com> (raw)
In-Reply-To: <87wn6m2q6m.fsf@intel.com>
On Tue, Dec 20, 2022 at 02:52:01PM +0200, Jani Nikula wrote:
> On Tue, 20 Dec 2022, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> > On Fri, Dec 16, 2022 at 06:00:20PM +0200, Jani Nikula wrote:
> >> By moving update_display_info() out of _drm_edid_connector_update() we
> >> make the function purely about adding modes.
> >
> > I don't think that's quite true. The 4:2:0 stuff still updates
> > various display_info things from the mode parsing functions.
>
> Right. I meant the top level. Will amend the commit message.
So what's going to happen with the 4:2:0 stuff? Are we just clobbering
it if/when someone calls the update_display_info() stuff w/o calling
add_modes()?
>
> BR,
> Jani.
>
>
> >
> >> Rename accordingly.
> >>
> >> Cc: Imre Deak <imre.deak@intel.com>
> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> ---
> >> drivers/gpu/drm/drm_edid.c | 25 ++++++++++++-------------
> >> 1 file changed, 12 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> >> index 15f69c362fc3..4ebfd7212bce 100644
> >> --- a/drivers/gpu/drm/drm_edid.c
> >> +++ b/drivers/gpu/drm/drm_edid.c
> >> @@ -6575,19 +6575,12 @@ static int add_displayid_detailed_modes(struct drm_connector *connector,
> >> return num_modes;
> >> }
> >>
> >> -static int _drm_edid_connector_update(struct drm_connector *connector,
> >> - const struct drm_edid *drm_edid)
> >> +static int _drm_edid_connector_add_modes(struct drm_connector *connector,
> >> + const struct drm_edid *drm_edid)
> >> {
> >> const struct drm_display_info *info = &connector->display_info;
> >> int num_modes = 0;
> >>
> >> - /*
> >> - * CEA-861-F adds ycbcr capability map block, for HDMI 2.0 sinks.
> >> - * To avoid multiple parsing of same block, lets parse that map
> >> - * from sink info, before parsing CEA modes.
> >> - */
> >> - update_display_info(connector, drm_edid);
> >> -
> >> if (!drm_edid)
> >> return 0;
> >>
> >> @@ -6692,7 +6685,9 @@ int drm_edid_connector_update(struct drm_connector *connector,
> >> {
> >> int count;
> >>
> >> - count = _drm_edid_connector_update(connector, drm_edid);
> >> + update_display_info(connector, drm_edid);
> >> +
> >> + count = _drm_edid_connector_add_modes(connector, drm_edid);
> >>
> >> _drm_update_tile_info(connector, drm_edid);
> >>
> >> @@ -6762,7 +6757,8 @@ EXPORT_SYMBOL(drm_connector_update_edid_property);
> >> */
> >> int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
> >> {
> >> - struct drm_edid drm_edid;
> >> + struct drm_edid _drm_edid;
> >> + const struct drm_edid *drm_edid;
> >>
> >> if (edid && !drm_edid_is_valid(edid)) {
> >> drm_warn(connector->dev, "[CONNECTOR:%d:%s] EDID invalid.\n",
> >> @@ -6770,8 +6766,11 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
> >> edid = NULL;
> >> }
> >>
> >> - return _drm_edid_connector_update(connector,
> >> - drm_edid_legacy_init(&drm_edid, edid));
> >> + drm_edid = drm_edid_legacy_init(&_drm_edid, edid);
> >> +
> >> + update_display_info(connector, drm_edid);
> >> +
> >> + return _drm_edid_connector_add_modes(connector, drm_edid);
> >> }
> >> EXPORT_SYMBOL(drm_add_edid_modes);
> >>
> >> --
> >> 2.34.1
>
> --
> Jani Nikula, Intel Open Source Graphics Center
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-12-20 13:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 16:00 [Intel-gfx] [PATCH v6 00/12] drm/edid, drm/i915: further drm_edid work, finally switch i915 over Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 01/12] drm/edid: store quirks in display info Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 02/12] drm/edid: stop passing quirks around Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 03/12] drm/edid: rename struct drm_display_info *display to *info Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 04/12] drm/edid: merge ELD handling to update_display_info() Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 05/12] drm/edid: move EDID BPC quirk application " Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 06/12] drm/edid: refactor _drm_edid_connector_update() and rename Jani Nikula
2022-12-20 12:36 ` Ville Syrjälä
2022-12-20 12:52 ` Jani Nikula
2022-12-20 13:02 ` Ville Syrjälä [this message]
2022-12-20 13:44 ` Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 07/12] drm/edid: add separate drm_edid_connector_add_modes() Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 08/12] drm/edid: remove redundant _drm_connector_update_edid_property() Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 09/12] drm/i915/edid: convert DP, HDMI and LVDS to drm_edid Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 10/12] drm/i915/bios: convert intel_bios_init_panel() " Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 11/12] drm/i915/opregion: convert intel_opregion_get_edid() to struct drm_edid Jani Nikula
2022-12-16 16:00 ` [Intel-gfx] [PATCH v6 12/12] drm/i915/panel: move panel fixed EDID to struct intel_panel Jani Nikula
2022-12-18 23:35 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/edid, drm/i915: further drm_edid work, finally switch i915 over Patchwork
2022-12-19 0:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-12-19 2:11 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=Y6GyadM7DS6Z+Hvd@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/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