From patchwork Wed Mar 24 15:00:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 408264 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7243EC433F1 for ; Wed, 24 Mar 2021 15:01:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60DB361A16 for ; Wed, 24 Mar 2021 15:01:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236389AbhCXPA7 (ORCPT ); Wed, 24 Mar 2021 11:00:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236391AbhCXPAs (ORCPT ); Wed, 24 Mar 2021 11:00:48 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325D1C061763 for ; Wed, 24 Mar 2021 08:00:48 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id u9so2945004ljd.11 for ; Wed, 24 Mar 2021 08:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d5O4S87sSonR8b8YReuDQ+tyO7OoPApI6qR6ZtyWtNo=; b=ag41z3TTI+1hBOp+V0y4TJVbNjU4P32YDILwsy7eFogpNU14hviu29k6mpVJXDa0/O ZAKTkSO145kL4WjVZSc3XzIoAaxYiPPZ9SMz/64GtrFp3ovjG38Rg4O8EBNaWk1O+0Kq XnnFzHB3jqgTkfQ2c2HL3O13OmbKf7NUiJ5OD4GXA62V6Dc4NA/ysda9maA2cIXl/Cm2 cXXPSs+nzdrt7uH5OcNULCqokEROmZKlR1ekDxYlKzVsPEMJOphetpg0MvnjLar5EJBH 3Q6jZjWbGGzkoihRkVXkCAHYbmYer8U2Wb1xszsMI0DsTJ+wCBHQKGudylwMsWa0fvsi 9bag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d5O4S87sSonR8b8YReuDQ+tyO7OoPApI6qR6ZtyWtNo=; b=CuCyZWWx5rLnt/uacH97ZwFFurdax1coYfuyXsboLtqXDmDwWDRSbd2ms0JQW4Q+xw c5JiliDHvfoEAmXssEJciis3CfdsaFAm5t6q48Gby2D4ziOXqceyEtFH8fmsY+itFTLr JKMsAUzZzvC9Sq/UqESSx12CVDT9PhKjJCln5nU7B0Om+lm3nLOTKLFUqHtp9gJZtPOf rhw7bZqIB8Hwze7cQdn8SrXIPoWZw5Ix7jHPFXO9AJ06vV/diQbmO3F2T0d/63moa8Oa IvuycLmUUWVy0cSUthFel3dOH/mtg9ltXuy8WzHdO5f7D/KsSJDxt2UKR4dQ3Q9tMW4g jrNQ== X-Gm-Message-State: AOAM530okRxYWZM3sO7BM1YziRhXEpjiPiXzIft3AAztvHkXmTP/s9Q/ BTIkuhLzpF1ZO3PGmDVFUeoMeQ== X-Google-Smtp-Source: ABdhPJxKAmSj+KeuEBTRDy807NV2uoHenAL8d/JKDr/XiRp5IT+zSvPM1S4LjmLY5sC2E0blLpRhcw== X-Received: by 2002:a2e:6c10:: with SMTP id h16mr2397033ljc.388.1616598045961; Wed, 24 Mar 2021 08:00:45 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id p5sm252463lfe.154.2021.03.24.08.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 08:00:45 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Jonathan Marek Cc: Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 13/21] drm/msm/dpu: hw_pp: make setup_dither mandatory Date: Wed, 24 Mar 2021 18:00:16 +0300 Message-Id: <20210324150024.2768215-14-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210324150024.2768215-1-dmitry.baryshkov@linaro.org> References: <20210324150024.2768215-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org All supported hardware instances feature DPU_PINGPONG_DITHER option, so just mark setup_dither as mandatory rather than optional callback. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index f80694456fd6..ac03f329491d 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -217,9 +217,6 @@ static void _dpu_encoder_setup_dither(struct dpu_hw_pingpong *hw_pp, unsigned bp { struct dpu_hw_dither_cfg dither_cfg = { 0 }; - if (!hw_pp->ops.setup_dither) - return; - switch (bpc) { case 6: dither_cfg.c0_bitdepth = 6; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c index 89c1123d957f..5c1ce835cf49 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c @@ -258,8 +258,7 @@ static void _setup_pingpong_ops(struct dpu_hw_pingpong *c, c->ops.poll_timeout_wr_ptr = dpu_hw_pp_poll_timeout_wr_ptr; c->ops.get_line_count = dpu_hw_pp_get_line_count; - if (test_bit(DPU_PINGPONG_DITHER, &features)) - c->ops.setup_dither = dpu_hw_pp_setup_dither; + c->ops.setup_dither = dpu_hw_pp_setup_dither; }; struct dpu_hw_pingpong *dpu_hw_pingpong_init(enum dpu_pingpong idx,