linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
To: Melissa Wen <melissa.srw@gmail.com>
Cc: Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Christian Konig <christian.koenig@amd.com>,
	David Zhou <David1.Zhou@amd.com>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amd/display: dcn20: remove an unused function
Date: Tue, 3 Mar 2020 14:00:09 -0500	[thread overview]
Message-ID: <20200303190009.sqrll3a2npgjayfl@outlook.office365.com> (raw)
In-Reply-To: <20200302214029.zxakr6il6f52yixb@smtp.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3795 bytes --]

Hi,

Thanks for your patch, everything lgtm.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

On 03/02, Melissa Wen wrote:
> The dpp2_get_optimal_number_of_taps function is never used. Removing just for
> code cleaning up.
> 
> Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
> ---
>  .../gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c  | 78 -------------------
>  1 file changed, 78 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c
> index 13e057d7ee93..42bba7c9548b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c
> @@ -369,84 +369,6 @@ void dpp2_set_cursor_attributes(
>  	}
>  }
>  
> -#define IDENTITY_RATIO(ratio) (dc_fixpt_u3d19(ratio) == (1 << 19))
> -
> -bool dpp2_get_optimal_number_of_taps(
> -		struct dpp *dpp,
> -		struct scaler_data *scl_data,
> -		const struct scaling_taps *in_taps)
> -{
> -	/* Some ASICs does not support  FP16 scaling, so we reject modes require this*/
> -	if (scl_data->viewport.width  != scl_data->h_active &&
> -		scl_data->viewport.height != scl_data->v_active &&
> -		dpp->caps->dscl_data_proc_format == DSCL_DATA_PRCESSING_FIXED_FORMAT &&
> -		scl_data->format == PIXEL_FORMAT_FP16)
> -		return false;
> -
> -	if (scl_data->viewport.width > scl_data->h_active &&
> -		dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
> -		scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
> -		return false;
> -
> -	/* TODO: add lb check */
> -
> -	/* No support for programming ratio of 8, drop to 7.99999.. */
> -	if (scl_data->ratios.horz.value == (8ll << 32))
> -		scl_data->ratios.horz.value--;
> -	if (scl_data->ratios.vert.value == (8ll << 32))
> -		scl_data->ratios.vert.value--;
> -	if (scl_data->ratios.horz_c.value == (8ll << 32))
> -		scl_data->ratios.horz_c.value--;
> -	if (scl_data->ratios.vert_c.value == (8ll << 32))
> -		scl_data->ratios.vert_c.value--;
> -
> -	/* Set default taps if none are provided */
> -	if (in_taps->h_taps == 0) {
> -		if (dc_fixpt_ceil(scl_data->ratios.horz) > 4)
> -			scl_data->taps.h_taps = 8;
> -		else
> -			scl_data->taps.h_taps = 4;
> -	} else
> -		scl_data->taps.h_taps = in_taps->h_taps;
> -	if (in_taps->v_taps == 0) {
> -		if (dc_fixpt_ceil(scl_data->ratios.vert) > 4)
> -			scl_data->taps.v_taps = 8;
> -		else
> -			scl_data->taps.v_taps = 4;
> -	} else
> -		scl_data->taps.v_taps = in_taps->v_taps;
> -	if (in_taps->v_taps_c == 0) {
> -		if (dc_fixpt_ceil(scl_data->ratios.vert_c) > 4)
> -			scl_data->taps.v_taps_c = 4;
> -		else
> -			scl_data->taps.v_taps_c = 2;
> -	} else
> -		scl_data->taps.v_taps_c = in_taps->v_taps_c;
> -	if (in_taps->h_taps_c == 0) {
> -		if (dc_fixpt_ceil(scl_data->ratios.horz_c) > 4)
> -			scl_data->taps.h_taps_c = 4;
> -		else
> -			scl_data->taps.h_taps_c = 2;
> -	} else if ((in_taps->h_taps_c % 2) != 0 && in_taps->h_taps_c != 1)
> -		/* Only 1 and even h_taps_c are supported by hw */
> -		scl_data->taps.h_taps_c = in_taps->h_taps_c - 1;
> -	else
> -		scl_data->taps.h_taps_c = in_taps->h_taps_c;
> -
> -	if (!dpp->ctx->dc->debug.always_scale) {
> -		if (IDENTITY_RATIO(scl_data->ratios.horz))
> -			scl_data->taps.h_taps = 1;
> -		if (IDENTITY_RATIO(scl_data->ratios.vert))
> -			scl_data->taps.v_taps = 1;
> -		if (IDENTITY_RATIO(scl_data->ratios.horz_c))
> -			scl_data->taps.h_taps_c = 1;
> -		if (IDENTITY_RATIO(scl_data->ratios.vert_c))
> -			scl_data->taps.v_taps_c = 1;
> -	}
> -
> -	return true;
> -}
> -
>  void oppn20_dummy_program_regamma_pwl(
>  		struct dpp *dpp,
>  		const struct pwl_params *params,
> -- 
> 2.25.1
> 

-- 
Rodrigo Siqueira
https://siqueira.tech

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2020-03-03 19:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 21:40 [PATCH] drm/amd/display: dcn20: remove an unused function Melissa Wen
2020-03-03 19:00 ` Rodrigo Siqueira [this message]

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=20200303190009.sqrll3a2npgjayfl@outlook.office365.com \
    --to=rodrigo.siqueira@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=melissa.srw@gmail.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;
as well as URLs for NNTP newsgroup(s).