dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>
Cc: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>,
	Shirish S <shirish.s@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Tony Cheng <Tony.Cheng@amd.com>
Subject: Re: [PATCH 01/21] drm/amdgpu: Remove default best_encoder hook from DC
Date: Fri, 5 Oct 2018 11:41:25 -0400	[thread overview]
Message-ID: <7cd503cb-1b72-3ca7-6f73-13c32d4bba9e@amd.com> (raw)
In-Reply-To: <20181004202446.22905-2-daniel.vetter@ffwll.ch>

On 2018-10-04 04:24 PM, Daniel Vetter wrote:
> For atomic driver this is the default, no need to reimplement it. We
> still need to keep the copypasta for not-atomic drivers though, since
> no one polished the legacy crtc helpers as much as the atomic ones.
> 
> v2: amdgpu uses ->best_encoder internally, give it a local copy. It
> might be a good idea to merge the connector and encoder into one
> amdgpu_dm_sink structure, that might match DC internals better. At
> least for non-DPMST outputs. Kudos to Ville for spotting this.
> 
> v3: Rebase onto a487411a6481 ("drm/amd/display: Use DRM helper for
> best_encoder").
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
> Cc: Tony Cheng <Tony.Cheng@amd.com>
> Cc: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>
> Cc: Shirish S <shirish.s@amd.com>

Acked-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 6a2342d72742..107e70658238 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -3189,7 +3189,6 @@ amdgpu_dm_connector_helper_funcs = {
>  	 */
>  	.get_modes = get_modes,
>  	.mode_valid = amdgpu_dm_connector_mode_valid,
> -	.best_encoder = drm_atomic_helper_best_encoder
>  };
>  
>  static void dm_crtc_helper_disable(struct drm_crtc *crtc)
> @@ -3592,14 +3591,17 @@ static int to_drm_connector_type(enum signal_type st)
>  	}
>  }
>  
> +static struct drm_encoder *amdgpu_dm_connector_to_encoder(struct drm_connector *connector)
> +{
> +	return drm_encoder_find(connector->dev, NULL, connector->encoder_ids[0]);
> +}
> +
>  static void amdgpu_dm_get_native_mode(struct drm_connector *connector)
>  {
> -	const struct drm_connector_helper_funcs *helper =
> -		connector->helper_private;
>  	struct drm_encoder *encoder;
>  	struct amdgpu_encoder *amdgpu_encoder;
>  
> -	encoder = helper->best_encoder(connector);
> +	encoder = amdgpu_dm_connector_to_encoder(connector);
>  
>  	if (encoder == NULL)
>  		return;
> @@ -3726,14 +3728,12 @@ static void amdgpu_dm_connector_ddc_get_modes(struct drm_connector *connector,
>  
>  static int amdgpu_dm_connector_get_modes(struct drm_connector *connector)
>  {
> -	const struct drm_connector_helper_funcs *helper =
> -			connector->helper_private;
>  	struct amdgpu_dm_connector *amdgpu_dm_connector =
>  			to_amdgpu_dm_connector(connector);
>  	struct drm_encoder *encoder;
>  	struct edid *edid = amdgpu_dm_connector->edid;
>  
> -	encoder = helper->best_encoder(connector);
> +	encoder = amdgpu_dm_connector_to_encoder(connector);
>  
>  	if (!edid || !drm_edid_is_valid(edid)) {
>  		amdgpu_dm_connector->num_modes =
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-10-05 15:41 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 20:24 [PATCH 00/21] atomic helper cleanup, take 2 Daniel Vetter
2018-10-04 20:24 ` [PATCH 01/21] drm/amdgpu: Remove default best_encoder hook from DC Daniel Vetter
2018-10-05 15:41   ` Harry Wentland [this message]
2018-10-05 20:13     ` Leo Li
2018-10-04 20:24 ` [PATCH 02/21] drm/atomic-helper: Unexport drm_atomic_helper_best_encoder Daniel Vetter
2018-10-04 20:24 ` [PATCH 03/21] drm: Extract drm_atomic_state_helper.[hc] Daniel Vetter
2018-10-04 20:24 ` [PATCH 04/21] drm/vmwgfx: Don't look at state->allow_modeset Daniel Vetter
2018-10-04 20:24 ` [PATCH 05/21] drm/vmwgfx: Remove confused comment from vmw_du_connector_atomic_set_property Daniel Vetter
2018-10-04 22:40   ` Thomas Hellstrom
2018-10-05  6:43     ` Daniel Vetter
2018-10-05  7:48       ` Daniel Vetter
2018-10-05 18:19         ` Thomas Hellstrom
2018-10-05 18:30           ` Daniel Vetter
2018-10-04 20:24 ` [PATCH 06/21] drm/atomic: Improve docs for drm_atomic_state->allow_modeset Daniel Vetter
2018-10-04 20:24 ` [PATCH 07/21] drm/vmwgfx: Add FIXME comments for customer page_flip handlers Daniel Vetter
2018-10-04 20:24 ` [PATCH 08/21] drm/arcpgu: Drop transitional hooks Daniel Vetter
2018-10-04 20:24 ` [PATCH 09/21] drm/atmel: " Daniel Vetter
2018-10-04 20:24 ` [PATCH 10/21] drm/arcpgu: Use drm_atomic_helper_shutdown Daniel Vetter
     [not found] ` <20181004202446.22905-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2018-10-04 20:24   ` [PATCH 11/21] drm/msm: " Daniel Vetter
2018-10-04 20:24 ` [PATCH 12/21] drm/sti: " Daniel Vetter
2018-10-04 20:24 ` [PATCH 13/21] drm/vc4: " Daniel Vetter
2018-10-04 20:24 ` [PATCH 14/21] drm/zte: " Daniel Vetter
2018-10-05 13:07   ` Shawn Guo
2018-10-04 20:24 ` [PATCH 15/21] drm: Remove transitional helpers Daniel Vetter
2018-10-04 21:04   ` Sam Ravnborg
2018-10-05  6:10     ` Daniel Vetter
2018-10-04 20:24 ` [PATCH 16/21] drm/vmwgfx: Fix vmw_du_cursor_plane_atomic_check Daniel Vetter
2018-10-05 16:06   ` Daniel Vetter
2018-10-05 16:21     ` Thomas Hellstrom
2018-10-05 20:46       ` Daniel Vetter
2018-10-05 20:53         ` Thomas Hellstrom
2018-10-04 20:24 ` [PATCH 17/21] drm: Unexport drm_plane_helper_check_update Daniel Vetter
2018-10-04 21:03   ` Sam Ravnborg
2018-10-05  6:13     ` Daniel Vetter
2018-10-04 20:24 ` [PATCH 18/21] drm: Unexport primary plane helpers Daniel Vetter
2018-10-04 21:14   ` Sam Ravnborg
2018-10-05  6:18     ` Daniel Vetter
2018-10-05  9:47   ` [PATCH] " Daniel Vetter
2018-10-04 20:24 ` [PATCH 19/21] drm/doc: fix drm_driver_legacy_fb_format Daniel Vetter
2018-10-05  5:07   ` Gerd Hoffmann
2018-10-04 20:24 ` [PATCH 20/21] drm/todo: Add some cleanup tasks Daniel Vetter
2018-10-04 20:35   ` Ville Syrjälä
2018-10-05 16:07   ` Harry Wentland
2018-10-05 16:20     ` Eric Engestrom
2018-10-04 20:24 ` [PATCH 21/21] drm/doc: kerneldoc for quirk_addfb_prefer_xbgr_30bpp Daniel Vetter
2018-10-24 10:01   ` Alexandru-Cosmin Gheorghe
2018-10-24 12:19     ` 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=7cd503cb-1b72-3ca7-6f73-13c32d4bba9e@amd.com \
    --to=harry.wentland@amd.com \
    --cc=Tony.Cheng@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=shirish.s@amd.com \
    --cc=sunpeng.li@amd.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