Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2687749ybf; Mon, 2 Mar 2020 13:41:21 -0800 (PST) X-Google-Smtp-Source: ADFU+vswnVzSpLOaNHC8MOqbBQn+1mrQCQINgiKQmweubj0JnqG53inPr3YU+PuXUJS1DkCwz9FZ X-Received: by 2002:a9d:6c56:: with SMTP id g22mr927320otq.276.1583185280809; Mon, 02 Mar 2020 13:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583185280; cv=none; d=google.com; s=arc-20160816; b=uZaHjvaZOTAVXj75pZs3hcu716dOI1zHyyifbQ+fr8zqm73nMoGL6ERkbMNRB37qbs xL0whx8hoCq+VFnOlMG+y2QGvKbOLoSc/jX6Lz49+5WkuI4F3Eh6DhT4wkFaJqsUQWaT AE+Km4Cx5Wz6dT927EbISiImh65mAK8gFkrYTeIXWS5liCKaPdT6+gUcfeJOGxXD5/1f +QeLBJzZ48ECaHk+lVoJnYV1Eol6sRpyT8+y0RH6LqBvMiVDcCdd4Rbid2L5b/+on2aI 5bOv9RVarVebXq+I8WBC8vfV28gfvTuTp42Y79T9KzvfA+KKzR1gMk9GUq2LF3h07ATR O5nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=EvaxHgYpXoDlneHBTnvp220zewZT/Dua7ByW1c58oMM=; b=jrG04ITk70sAXtnzGi0jl2q8kL1hP3OfvP7dx+rHBHTEqdYKiHTyABf1S2zwFNc2dC Tglm0G83EeL7hLg1QbjRFGzPyo7GzYAQonfYM1u1OpxpHyZkdvEfXUSSKFgTzgx3qHK5 dIEvySr7tEGaL4hBr4FZpkw8+KCYcmuhxf9yO4/j+2V/5Ta+swZc1yIEmI04YjYPTJzv 5aK7z1OktvHFq5CCigzLyrShCzmnv5xoUmuxGLA6DqpYtyvxP5roei70/J+GgCsJDHFJ GGV9HOxC7ukvCGOTu2NamjueU779WcyCY3jbG67bCbPrmUngvH7RPsBo3ba5mI98+6Gx TZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S+vVLXOO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si6025940oij.175.2020.03.02.13.41.06; Mon, 02 Mar 2020 13:41:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S+vVLXOO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbgCBVko (ORCPT + 99 others); Mon, 2 Mar 2020 16:40:44 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:35057 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726793AbgCBVko (ORCPT ); Mon, 2 Mar 2020 16:40:44 -0500 Received: by mail-wm1-f65.google.com with SMTP id m3so706250wmi.0 for ; Mon, 02 Mar 2020 13:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=EvaxHgYpXoDlneHBTnvp220zewZT/Dua7ByW1c58oMM=; b=S+vVLXOOCuXYWey7XAChOvwKwuJRQMnKENNTKM40Mj1Tg6UfXe34t/e6IvB+L+uSF7 hTbyMvoov+1/O7AbN/vQKFMr1CqYqPYl3ex8zyQcLUz/gKD3pW905tV3Hf80KoC1y+Ew Wu6EbNmVvODGw+UUUlgSyiD9wA3KCEHzBXGu3k3+0S5u2AYzYwr0L8b9IiC/CZYe5lHZ DHId1NAtWgYwNQj/Z3TLCObVUo4gb4RExIT15PxXr4eVa/5G14SHAl/y4q5qF1ZjwP4j jGZoq2AtA+MFrCDdgQJWhvSNXOFl8OqATHEwoMdOqf2ZiDmT7ViMuIMIskuOtVtnTLS2 525Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=EvaxHgYpXoDlneHBTnvp220zewZT/Dua7ByW1c58oMM=; b=rVNXpsDj95mXemfEXinyn1ZfInu2R58Ypo8SzvZYrU1Gm+ZlT3CA/SdoFagdkiM+sj ZzgFU02NSuZT6covESXOq0XcjXcMrKxa72YymUbrwV+T22YmSaVkYmIyPsB7xKb8LmnC Clg2uI8UpOEiOwjYCun/ARopXrjEtujGRoOyYrTiVVVNaqXDWZPq6z4GGoAJUai74dPa mbrscLSD02vtPHYIpmi9+8i4mysPN8eWRrh7usLp/oG/xYbrBn3UCRR328voeZ16Bqv8 nwLo8bC1aZ30Iw1zrQ+TnX7/Ke7q4zzB2NDg4AgT0r70Xd1wRWdCUoVdCa6vx+h53So7 hp9A== X-Gm-Message-State: ANhLgQ0BPqk1XTElaDOIIyuJIwi8CS9IXQ7/fkwdGyNoIKt698jck373 uelIFalNNwZOXplfl+21Xgw= X-Received: by 2002:a1c:155:: with SMTP id 82mr352841wmb.99.1583185242656; Mon, 02 Mar 2020 13:40:42 -0800 (PST) Received: from smtp.gmail.com ([2001:818:e238:a000:51c6:2c09:a768:9c37]) by smtp.gmail.com with ESMTPSA id s12sm349963wmj.39.2020.03.02.13.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2020 13:40:41 -0800 (PST) Date: Mon, 2 Mar 2020 18:40:29 -0300 From: Melissa Wen To: Harry Wentland , Leo Li , Alex Deucher , Christian Konig , David Zhou , David Airlie , Daniel Vetter , Rodrigo Siqueira Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/display: dcn20: remove an unused function Message-ID: <20200302214029.zxakr6il6f52yixb@smtp.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dpp2_get_optimal_number_of_taps function is never used. Removing just for code cleaning up. Signed-off-by: Melissa Wen --- .../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