public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v3 3/3] drm: clean cached display info
Date: Tue, 27 Dec 2016 10:37:57 +0100	[thread overview]
Message-ID: <20161227093757.GA19172@dvetter-linux.ger.corp.intel.com> (raw)
In-Reply-To: <799e7c60-9dd5-087b-510c-2a96d9a526a7@synopsys.com>

On Thu, Dec 22, 2016 at 10:21:25AM +0000, Jose Abreu wrote:
> Hi Shashank,
> 
> 
> On 21-12-2016 15:29, Shashank Sharma wrote:
> > This patch adds a small helper function, which clears the cached
> > information about a hot-pluggable display, from connector. On event
> > This will run on event of a hot-unplug, keeping the connector's display
> > info up-to-date, avoiding any errors due to invalid cached data.
> >
> > Cc: Jose Abreu <joabreu@synopsys.com>
> >
> > Suggested-by: Jose Abreu <joabreu@synopsys.com>
> > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> > ---
> >  drivers/gpu/drm/drm_probe_helper.c | 20 ++++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> > index 7cff91e..9e97b45 100644
> > --- a/drivers/gpu/drm/drm_probe_helper.c
> > +++ b/drivers/gpu/drm/drm_probe_helper.c
> > @@ -164,6 +164,18 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev)
> >  }
> >  
> >  /**
> > + * drm_helper_clear_display_info - clean cached display information for
> > + * hot pluggable displays, on event of hot-unplug
> > + * @connector: connector under event
> > + */
> > +void drm_helper_clear_display_info(struct drm_connector *connector)
> > +{
> > +	struct drm_display_info *info = &connector->display_info;
> > +
> > +	memset(info, 0, sizeof(*info));
> > +}
> > +
> > +/**
> >   * drm_helper_probe_single_connector_modes - get complete set of display modes
> >   * @connector: connector to probe
> >   * @maxX: max width for modes
> > @@ -288,6 +300,14 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
> >  		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
> >  			connector->base.id, connector->name);
> >  		drm_mode_connector_update_edid_property(connector, NULL);
> > +
> > +		/*
> > +		 * Connector status change to disconnected, time to clean
> > +		 * cached display information
> > +		 */
> > +		if (connector->status == connector_status_disconnected)
> > +			drm_helper_clear_display_info(connector);
> > +
> 
> I don't know if this is the right place to do this because it is
> a helper and I don't know if it is used by all the drivers. We
> may need something more general that is always called when
> probing modes, or force drivers that don't use the helper to use
> the drm_helper_clear_display_info function. As I told you before,
> I'm new to dri-devel so we need more comments.

Seems reasonable to me, since afaik all drivers do use the probe helpers.
-Daniel

> 
> Best regards,
> Jose Miguel Abreu
> 
> >  		verbose_prune = false;
> >  		goto prune;
> >  	}
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-12-27  9:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-21 15:29 [PATCH v3 1/3] drm: Create new structure for HDMI info Shashank Sharma
2016-12-21 15:29 ` [PATCH v3 2/3] drm: parse hf-vsdb Shashank Sharma
2016-12-22 10:10   ` Jose Abreu
2016-12-21 15:29 ` [PATCH v3 3/3] drm: clean cached display info Shashank Sharma
2016-12-22 10:21   ` Jose Abreu
2016-12-27  9:37     ` Daniel Vetter [this message]
2016-12-29  5:53       ` Sharma, Shashank
2016-12-29 10:05         ` Jose Abreu
2016-12-29 10:52           ` Sharma, Shashank
2016-12-21 16:15 ` ✓ Fi.CI.BAT: success for series starting with [v3,1/3] drm: Create new structure for HDMI info Patchwork
2016-12-22 10:02 ` [PATCH v3 1/3] " Jose Abreu
2016-12-22 11:56   ` [Intel-gfx] " Ville Syrjälä
2016-12-23  2:57     ` Sharma, Shashank

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=20161227093757.GA19172@dvetter-linux.ger.corp.intel.com \
    --to=daniel@ffwll.ch \
    --cc=Jose.Abreu@synopsys.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox