From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Kunal Joshi <kunal1.joshi@intel.com>,
dri-devel@lists.freedesktop.org, daniel.vetter@intel.com,
arkadiusz.hiler@intel.com, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v6 3/3] drm/i915: Send hotplug event if edid had changed
Date: Thu, 25 Jun 2020 13:46:24 +0300 [thread overview]
Message-ID: <20200625104624.GA29687@intel.com> (raw)
In-Reply-To: <61952a12-bd15-92ce-fd81-88a35ed88acb@linux.intel.com>
On Thu, Jun 25, 2020 at 10:36:28AM +0200, Maarten Lankhorst wrote:
> Op 23-06-2020 om 20:57 schreef Kunal Joshi:
> > From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> >
> > Added epoch counter checking to intel_encoder_hotplug
> > in order to be able process all the connector changes,
> > besides connection status. Also now any change in connector
> > would result in epoch counter change, so no multiple checks
> > are needed.
> >
> > v2: Renamed change counter to epoch counter. Fixed type name.
> >
> > v3: Fixed rebase conflict
> >
> > v4: Remove duplicate drm_edid_equal checks from hdmi and dp,
> > lets use only once edid property is getting updated and
> > increment epoch counter from there.
> > Also lets now call drm_connector_update_edid_property
> > right after we get edid always to make sure there is a
> > unified way to handle edid change, without having to
> > change tons of source code as currently
> > drm_connector_update_edid_property is called only in
> > certain cases like reprobing and not right after edid is
> > actually updated.
> >
> > v5: Fixed const modifiers, removed blank line
> >
> > v6: Removed drm specific part from this patch, leaving only
> > i915 specific changes here.
> >
> > Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> > ---
>
> Much better!
>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> for whole series
I think it had been for year in that state already :)
At some point I was just distracted by some other things.
Stan
>
> > drivers/gpu/drm/i915/display/intel_hotplug.c | 26 +++++++++++---------
> > 1 file changed, 15 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
> > index 2e94c1413c02..393813494523 100644
> > --- a/drivers/gpu/drm/i915/display/intel_hotplug.c
> > +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
> > @@ -283,6 +283,8 @@ intel_encoder_hotplug(struct intel_encoder *encoder,
> > {
> > struct drm_device *dev = connector->base.dev;
> > enum drm_connector_status old_status;
> > + u64 old_epoch_counter;
> > + bool ret = false;
> >
> > drm_WARN_ON(dev, !mutex_is_locked(&dev->mode_config.mutex));
> > old_status = connector->base.status;
> > @@ -290,17 +292,19 @@ intel_encoder_hotplug(struct intel_encoder *encoder,
> > connector->base.status =
> > drm_helper_probe_detect(&connector->base, NULL, false);
> >
> > - if (old_status == connector->base.status)
> > - return INTEL_HOTPLUG_UNCHANGED;
> > -
> > - drm_dbg_kms(&to_i915(dev)->drm,
> > - "[CONNECTOR:%d:%s] status updated from %s to %s\n",
> > - connector->base.base.id,
> > - connector->base.name,
> > - drm_get_connector_status_name(old_status),
> > - drm_get_connector_status_name(connector->base.status));
> > -
> > - return INTEL_HOTPLUG_CHANGED;
> > + if (old_epoch_counter != connector->base.epoch_counter)
> > + ret = true;
> > +
> > + if(ret) {
> > + DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s(epoch counter %llu)\n",
> > + connector->base.base.id,
> > + connector->base.name,
> > + drm_get_connector_status_name(old_status),
> > + drm_get_connector_status_name(connector->base.status),
> > + connector->base.epoch_counter);
> > + return INTEL_HOTPLUG_CHANGED;
> > + }
> > + return INTEL_HOTPLUG_UNCHANGED;
> > }
> >
> > static bool intel_encoder_has_hpd_pulse(struct intel_encoder *encoder)
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-06-25 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 18:57 [PATCH v6 0/3] Send a hotplug when edid changes Kunal Joshi
2020-06-23 18:57 ` [PATCH v6 1/3] drm: Add helper to compare edids Kunal Joshi
2020-06-23 18:57 ` [PATCH v6 2/3] drm: Introduce epoch counter to drm_connector Kunal Joshi
2020-06-23 18:57 ` [PATCH v6 3/3] drm/i915: Send hotplug event if edid had changed Kunal Joshi
2020-06-25 8:36 ` Maarten Lankhorst
2020-06-25 10:46 ` Lisovskiy, Stanislav [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-09-06 8:26 [PATCH v6 0/3] Send a hotplug when edid changes Stanislav Lisovskiy
2019-09-06 8:26 ` [PATCH v6 3/3] drm/i915: Send hotplug event if edid had changed Stanislav Lisovskiy
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=20200625104624.GA29687@intel.com \
--to=stanislav.lisovskiy@intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=arkadiusz.hiler@intel.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kunal1.joshi@intel.com \
--cc=maarten.lankhorst@linux.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;
as well as URLs for NNTP newsgroup(s).