dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Cc: "daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"bskeggs@redhat.com" <bskeggs@redhat.com>,
	"alexander.deucher@amd.com" <alexander.deucher@amd.com>
Subject: Re: [Intel-gfx] [PATCH v2 8/9] drm/dp: Release DP MST shared link bandwidth
Date: Thu, 26 Jan 2017 09:41:46 +0100	[thread overview]
Message-ID: <20170126084146.wuewdp54wvswzf3f@phenom.ffwll.local> (raw)
In-Reply-To: <1485378673.15309.15.camel@dk-H97M-D3H>

On Wed, Jan 25, 2017 at 08:53:18PM +0000, Pandiyan, Dhinakaran wrote:
> On Wed, 2017-01-25 at 07:16 +0100, Daniel Vetter wrote:
> > On Tue, Jan 24, 2017 at 03:49:36PM -0800, Dhinakaran Pandiyan wrote:
> > > Implement the ->atomic_release() callback to release the shared link
> > > bandwidth that was originally acquired during compute_config()
> > > 
> > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_dp_mst.c | 28 ++++++++++++++++++++++++++++
> > >  1 file changed, 28 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> > > index f51574f..2f57a56 100644
> > > --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> > > +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> > > @@ -78,6 +78,33 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
> > >  
> > >  }
> > >  
> > > +static void intel_dp_mst_atomic_release(struct drm_connector *connector,
> > > +					struct drm_connector_state *conn_state)
> > > +{
> > > +	struct intel_dp_mst_encoder *intel_mst;
> > > +	struct drm_dp_mst_topology_mgr *mgr;
> > > +	struct drm_dp_mst_topology_state *topology_state;
> > > +	struct drm_encoder *encoder;
> > > +	struct intel_connector *intel_connector = to_intel_connector(connector);
> > > +
> > > +	encoder = connector->state->best_encoder;
> > > +	if (!encoder || to_intel_encoder(encoder)->type != INTEL_OUTPUT_DP_MST)
> > > +		return;
> > 
> > NULL encoder should imo be caught in core. Type != DP_MST is impossible,
> > if you're unsure make it into a BUG_ON for testing.
> 
> 
> I don't get why (type != INTEL_OUTPUT_DP_MST) is impossible. Is that
> because we have the implementation for atomic_release() only for MST
> connectors? But, that is only for now.

Yes. And if we add atomic_release for other encoders, then ofcourse we
will not reuse the mst one there. See all the other intel_dp_mst_* hooks
in the same vfunc table, those also don't check for the encoder type. This
would be like doing a runtime type check in C++ for the "this" pointer :-)
-Daniel
-- 
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:[~2017-01-26  8:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 23:49 [PATCH v2 0/9] Adding private objects to atomic state Dhinakaran Pandiyan
2017-01-24 23:49 ` [PATCH v2 1/9] drm/dp: Store drm_device in MST topology manager Dhinakaran Pandiyan
2017-01-25  0:30   ` [Intel-gfx] " Dave Airlie
2017-01-24 23:49 ` [PATCH v2 2/9] drm/dp: Kill unused MST vcpi slot availability tracking Dhinakaran Pandiyan
2017-01-25  5:43   ` Daniel Vetter
2017-01-25 20:36     ` Pandiyan, Dhinakaran
2017-01-24 23:49 ` [PATCH v2 3/9] drm/dp: Split drm_dp_mst_allocate_vcpi Dhinakaran Pandiyan
2017-01-25  0:31   ` Dave Airlie
2017-01-25 20:34     ` Pandiyan, Dhinakaran
2017-01-24 23:49 ` [PATCH v2 4/9] drm: Add driver private objects to atomic state Dhinakaran Pandiyan
2017-01-25  5:59   ` Daniel Vetter
2017-01-25 20:47     ` Pandiyan, Dhinakaran
2017-01-26  8:38       ` [Intel-gfx] " Daniel Vetter
2017-01-25 21:33     ` Harry Wentland
2017-01-26  8:40       ` Daniel Vetter
2017-01-24 23:49 ` [PATCH v2 5/9] drm/dp: Introduce MST topology state Dhinakaran Pandiyan
2017-01-25  6:05   ` Daniel Vetter
2017-01-24 23:49 ` [PATCH v2 6/9] drm/dp: Add DP MST helpers to atomically find and release vcpi slots Dhinakaran Pandiyan
2017-01-24 23:49 ` [PATCH v2 7/9] drm: Connector helper function to release atomic state Dhinakaran Pandiyan
2017-01-25  6:18   ` Daniel Vetter
2017-01-25 21:01     ` Pandiyan, Dhinakaran
2017-01-31  0:14     ` Pandiyan, Dhinakaran
2017-01-24 23:49 ` [PATCH v2 8/9] drm/dp: Release DP MST shared link bandwidth Dhinakaran Pandiyan
2017-01-25  6:16   ` Daniel Vetter
2017-01-25 20:53     ` Pandiyan, Dhinakaran
2017-01-26  8:41       ` Daniel Vetter [this message]
2017-01-24 23:49 ` [PATCH v2 9/9] drm/dp: Track MST " Dhinakaran Pandiyan
2017-01-25  6:15   ` Daniel Vetter
2017-01-25 21:00     ` Pandiyan, Dhinakaran
2017-01-26  8:42       ` [Intel-gfx] " Daniel Vetter

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=20170126084146.wuewdp54wvswzf3f@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=alexander.deucher@amd.com \
    --cc=bskeggs@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dhinakaran.pandiyan@intel.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;
as well as URLs for NNTP newsgroup(s).