From patchwork Thu Feb 17 03:53:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543356 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp88940imn; Wed, 16 Feb 2022 19:54:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyJhvjhiR4bEbJg+90hIdUqSucFcoPsVextqq6/+/58G6azPOr7m9GN37OA5XNyYDTXpKV X-Received: by 2002:a05:6a00:148b:b0:4e0:1001:1063 with SMTP id v11-20020a056a00148b00b004e010011063mr1276444pfu.15.1645070066877; Wed, 16 Feb 2022 19:54:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645070066; cv=none; d=google.com; s=arc-20160816; b=dBdxx6sU46x9mLdQFmHp6eBS04wz38//E6AYKmD0ui/BduQG7VuHM4183Nf6PDxq/Z N6ImgkOMlcjSY/irWPey1cdD8r+YCgqfJxgB+f8p/zBOdAYALnRx3qEC+n4m8D0d0ClP zk4lQlqCjY9lJWVzFO55XTW3LCXvsyYOSYp6n+4vrkO55NDdmmxy503VDN/Sj6vRI3JX dHA6r6GSo9+ZTc7fPjfg/HQC7iWkibF6lkmcrwxqrIq5EAh1PjmvvvHmh+Q7w61K5S5K rFNE7CjIH5yaXMPlCduNrbYnJ+Vgyjyysls/Oe/CIuUYEi5K+P21olO5GFBBnn19dj88 8v+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=2AdJ+qrckMHTJcRwxA8dkshi8PG6FFViBpmjAV8cCbI=; b=MPAkXzK0B0U/w2m9rqiVASGquZ4bRXySNxVWbBJcrdF4AXmVmDIqJY+XubdLlAf1pf vBLP9UecnSKAAHVZj2tKxRx1Sj+tc3QZIlSHzfRuJ0zgB5XjwPk9vx/e1n5EL+iZitBK u/yjC7TBe/Q3JyXzokHOAU3p0jOtv+bNVRtvqdS8iAL7C9qO4304C4fGXewEiUGyYbcl IgTuLM0TAmi6KewC2R1XxUltrPnE/R1v0b0gsTUGEB/5vu96cMJjKmH5Xn7rtKNrj3XZ CkA7T1uKAdaj9Szw7gMpypA0ZgffZoNLt3q4i+qcDQo4rsZg8J4jddu9l9mq30rmx/2Z wPaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YdeBlsi7; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id x14si6655091pgf.464.2022.02.16.19.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YdeBlsi7; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55DC210E75E; Thu, 17 Feb 2022 03:54:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by gabe.freedesktop.org (Postfix) with ESMTPS id E873210E75F for ; Thu, 17 Feb 2022 03:54:02 +0000 (UTC) Received: by mail-lf1-x131.google.com with SMTP id f37so7545379lfv.8 for ; Wed, 16 Feb 2022 19:54:02 -0800 (PST) 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=2AdJ+qrckMHTJcRwxA8dkshi8PG6FFViBpmjAV8cCbI=; b=YdeBlsi7Cyzf4Eq7wBVPnTETdHlYz6euXzIFkcUr+cR2wdgIgI1YnhPQVMwj0VQQa4 FZezexG9HiA/r7U7Wrbfo6UVTtfPfAh085oHq0rKVj0zyfhCZvbpGlE60CQccHo8tTNg GVvT0+k93R5zSgbiwBcte3drWUZwyPfCQMGiLYxXLwHX5W7kg0gfrPO3YllduuEmZNWJ Uyfvl4gPmNpii/3+gmD677VfDLTvosb/dxY03SWkMBEbjjrr27jutKebs0vCzpkMmoDl uFAjzc1S1IPfxOGfpAQEfx/1EwCRz/NphQB/n9xYAUMm4eimR5wddnZFGWvwzA7cFA7S Bavw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2AdJ+qrckMHTJcRwxA8dkshi8PG6FFViBpmjAV8cCbI=; b=blXwtGSQkImxQ3WmXgo1zwNA93tTcZDLYcM1XyHiYu0LP8Ge5i2J/T+/T2kQJjIN09 p4d7K4IkXX56gcSkXCdLak6mr+dz2kPuhmRlOt25kZUdE9U21AN4b4jUckxzFY47Yuly uG2NuM+gmKUV6ycgZ/Uo+Xmn2iEGq0yI5mTYUaN3QJkjAfG4xdAGktlWiZqELBvD7vER K06dqNgq+RLEoTOSEuRVu5HOSTGrK9kpWSLH03h94TDpd6sQFzk1iaIV+KyhSp9vwkI8 /YzXF6OqgkP6OsZ6KeqhinS35E7ErtsfGACTR3e2dMPEFsj1xDvVuzGDzqZ4j1oK1sE4 jUpg== X-Gm-Message-State: AOAM531LL1eZ5Wxrqvpz2PfRDM2MiUBYMauE2ExShFvc1hPf0/dgSesw LiJdq/KCZk4RcDbfQqXuoKbV4ul0B+VoAw== X-Received: by 2002:a05:6512:481:b0:43d:f703:721e with SMTP id v1-20020a056512048100b0043df703721emr803431lfq.55.1645070041209; Wed, 16 Feb 2022 19:54:01 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h9sm1575454ljb.77.2022.02.16.19.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:00 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 1/7] drm/msm/dpu: fix dp audio condition Date: Thu, 17 Feb 2022 06:53:52 +0300 Message-Id: <20220217035358.465904-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> References: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" DP audio enablement code which is comparing intf_type, DRM_MODE_ENCODER_TMDS (= 2) with DRM_MODE_CONNECTOR_DisplayPort (= 10). Which would never succeed. Fix it to check for DRM_MODE_ENCODER_TMDS. Fixes: d13e36d7d222 ("drm/msm/dp: add audio support for Display Port on MSM") Reviewed-by: Abhinav Kumar Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 1e648db439f9..02d0fae1c6dc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1099,7 +1099,7 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc) } - if (dpu_enc->disp_info.intf_type == DRM_MODE_CONNECTOR_DisplayPort && + if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_TMDS && dpu_enc->cur_master->hw_mdptop && dpu_enc->cur_master->hw_mdptop->ops.intf_audio_select) dpu_enc->cur_master->hw_mdptop->ops.intf_audio_select( From patchwork Thu Feb 17 03:53:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543350 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp88845imn; Wed, 16 Feb 2022 19:54:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEQYf6c/uSlAH4BO9DDA9IgKuRPd/8BDQpkTEn6215hfbMJ1dOWw0HkRqoS3PKSqQQBx74 X-Received: by 2002:a17:90b:1283:b0:1b9:cfb1:9cad with SMTP id fw3-20020a17090b128300b001b9cfb19cadmr5355503pjb.82.1645070049706; Wed, 16 Feb 2022 19:54:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645070049; cv=none; d=google.com; s=arc-20160816; b=uIJgyRmw6r1FyVPjz7yXmb8pSsIlycw5c82/0UOBb0JUZ6msQU5IQiInjxQAAlNELW T9lqV1ixway34RDvgEKWMtkuqjE+vK3iGoh/xu5vrAQb2t6ykRrs2Ie3q9x95sLtbojY cewIL/MYY9Dj/9Hng7PHJT+xsw/RpNXLh+IfD8sUE4YU6NetiViMXA9G5Nslc0dmcOma o0AkRQiaGsIBRlfeqWFARu7JlFiYEJJfGZwMeeN4tZOU2KE/93dPwnnhJtUW3U+Mze+M xY4rPh9DFY38m9AQ4hrr0TAsmLi1KYESap6Um0CszeS0Yw6lAlNuHnNpgfr+A+mXuz83 Cw4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=0kyxRMMBG2gpm69Eogx/Pqcstxzhu1JTR7Us2wGmBvY=; b=ojoG003lE/XKI/pKEvT6DypsaEocgrB743oEQKI0zItagPAKguemtFm8J0tGYdYObR UZsuvbL94m2/iLbx4o1DQdewyreRKrqWHBEkJ4l1DYoZNFySszOAkdtERQzNqw4Q33QE 5107goaUpmfwwAZKrHPkN+fofvhR0adVJYxSUnrgdfLrXBNqwrUkzLH8Y/dOU2WoM0eW sJL6/9bg4jkoEIKfrqs/p34sViPzoQCHpxIBJ73GIICj9isvCpwuh0wlH+kGiYftoEqb v0HXcMOasPUXhpBVvQ1IMsnu3FJ/46pD2f0+1e8SqUGZ+ElOpNJWiJAJppkSflg7og9Y VzSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fKV36McY; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id v7si414111pfu.8.2022.02.16.19.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fKV36McY; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C49710E789; Thu, 17 Feb 2022 03:54:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD4B110E75F for ; Thu, 17 Feb 2022 03:54:03 +0000 (UTC) Received: by mail-lj1-x233.google.com with SMTP id bx31so6440570ljb.0 for ; Wed, 16 Feb 2022 19:54:03 -0800 (PST) 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=0kyxRMMBG2gpm69Eogx/Pqcstxzhu1JTR7Us2wGmBvY=; b=fKV36McY3ySvJQwBRVQSuXKAstnJZQcBQRIuW05OzVCs7WnOqmkmKW4/+PbXwA18n/ HiuJIUpyCQW87rPyh8GbIiZpfpNgXJtXBehB3MufCtb4XiQqriewEYgZXXQuKpOXq0gP 9FFOSnSZBCb19/h5skw6QKaT8ZtdyS4Coywy7gs+htHnrsOH+YKvTHzX04ANp+I4VCcl vbDysr3lHt8QGupfuz5WMrMRosE0J/gLlpuKXIfMAAK+xR44Uu3pxeMKixTzm/0t78cK N1Kok1Zldl0FNTr4ABFP6TNhYuSUQj7BhdIaGW3HB66VgNZer7Gi1RLFzm9PIScrKeBB ORtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0kyxRMMBG2gpm69Eogx/Pqcstxzhu1JTR7Us2wGmBvY=; b=ygMShk8WO/21x36zaLZRv0XumqpoZOz2J+w4+3kDHKd3adMLEbOxSzBXKiG6PGzqRu vxUpsJXdzv4ydADDkhH0wpH4nq2M3nAhAgUmazSs4eivOGtMS3X2dmikdY4hSQphSGLj zJRgKXE2kC5y3ASp7YDPpTGpLnYq6AczNyAzEWAaxP/L1XNMztO8hacyGN54dDqYDKWb SwjsVloQAJUJPPOrrDEJxEdkaMiQZ3vPYTamV7kluqz+zl/6FIL/BAD7D8xpEywFewb3 MrmzqvQ2ym6irWliqO4X+cG/1hgrjLcqgEIIpcx5Rfg+7kAo8xm4fOnjmbEjpazzKS3m swbw== X-Gm-Message-State: AOAM530G8ywCvukFGb9LWCfm/1inMXoLyCy46N2ddraNltbFsegys68q v972iQuWCVD0qgU9RTe/iO2fZQ== X-Received: by 2002:a05:651c:1547:b0:244:8a9b:d0a1 with SMTP id y7-20020a05651c154700b002448a9bd0a1mr882457ljp.53.1645070042135; Wed, 16 Feb 2022 19:54:02 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h9sm1575454ljb.77.2022.02.16.19.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:01 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 2/7] drm/msm: move struct msm_display_info to dpu driver Date: Thu, 17 Feb 2022 06:53:53 +0300 Message-Id: <20220217035358.465904-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> References: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The msm_display_info structure is not used by the rest of msm driver, so move it into the dpu1 (dpu_encoder.h to be precise). Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 18 ++++++++++++++++++ drivers/gpu/drm/msm/msm_drv.h | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h index e241914a9677..ebe3944355bb 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h @@ -34,6 +34,24 @@ struct dpu_encoder_hw_resources { void dpu_encoder_get_hw_resources(struct drm_encoder *encoder, struct dpu_encoder_hw_resources *hw_res); +/** + * struct msm_display_info - defines display properties + * @intf_type: DRM_MODE_ENCODER_ type + * @capabilities: Bitmask of display flags + * @num_of_h_tiles: Number of horizontal tiles in case of split interface + * @h_tile_instance: Controller instance used per tile. Number of elements is + * based on num_of_h_tiles + * @is_te_using_watchdog_timer: Boolean to indicate watchdog TE is + * used instead of panel TE in cmd mode panels + */ +struct msm_display_info { + int intf_type; + uint32_t capabilities; + uint32_t num_of_h_tiles; + uint32_t h_tile_instance[MAX_H_TILES_PER_DISPLAY]; + bool is_te_using_watchdog_timer; +}; + /** * dpu_encoder_assign_crtc - Link the encoder to the crtc it's assigned to * @encoder: encoder pointer diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index d7574e6bd4e4..16f9e25ee19e 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -109,24 +109,6 @@ struct msm_display_topology { u32 num_dspp; }; -/** - * struct msm_display_info - defines display properties - * @intf_type: DRM_MODE_ENCODER_ type - * @capabilities: Bitmask of display flags - * @num_of_h_tiles: Number of horizontal tiles in case of split interface - * @h_tile_instance: Controller instance used per tile. Number of elements is - * based on num_of_h_tiles - * @is_te_using_watchdog_timer: Boolean to indicate watchdog TE is - * used instead of panel TE in cmd mode panels - */ -struct msm_display_info { - int intf_type; - uint32_t capabilities; - uint32_t num_of_h_tiles; - uint32_t h_tile_instance[MAX_H_TILES_PER_DISPLAY]; - bool is_te_using_watchdog_timer; -}; - /* Commit/Event thread specific structure */ struct msm_drm_thread { struct drm_device *dev; From patchwork Thu Feb 17 03:53:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543353 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp88882imn; Wed, 16 Feb 2022 19:54:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyrbZHL2iaGiQu3jjKG2kdnTBqrXCe1Rkju9MfJvz35D3WYgS/Urn3ds/9nPQIkV/c9g0f X-Received: by 2002:a63:6442:0:b0:362:ad55:f5e5 with SMTP id y63-20020a636442000000b00362ad55f5e5mr958687pgb.180.1645070059076; Wed, 16 Feb 2022 19:54:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645070059; cv=none; d=google.com; s=arc-20160816; b=dOv+pYuT8s/daAQDYeFPEjK6m13WYBIWZwXGKFO8eZl2iMod008m2vOpg7Yj9vj6ys HQEanhKMvPsuG5Y7MPmey83DotpJPLNm57OoFLRTEVm4LjNxouHUnNutVli27u9ojsKu grZrlcR2FnH4/omDCntuW/2niXKu1fHp47yu95B3TbngoK5/ubqkLpn5K2lds/u42Fgw 32T329VuLN3WCDMcKMVy5UI0tl/i2rB4q11JeeljVuHplQkRaYXKOVpYOi9lQ0GEUmKR IkIPyOPuRzab9IE4ACDOpJ1jZGPIGgaM42TN+CHZfANmDNoMbeQtjJZNv8kpHx41748Q ze0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=RR1N4aPEBsDSrMkYWyN5C+eYSYGI+wdfjT+eCdTVa9U=; b=OG0NnLbVdLSGhd7wiQFbE0a/E6/6USNeIOxoSkqKF0vmMA2B5zZ28vZY1qahBIZ+sy jykVVO9MiKmy5Erpk9BqRo+6qRZ+tvDYR80ef17Kmp9Wii21DgZXYLhrb21bkzqmZrB+ UKIPeiwxQxpZCcIqBhMOwnYXGExieAZc8xgaPuW74uEPk1Gdgy9S4XNvh7mzl9unt4vD XmSsKKJzn956WHAOuPJvUy+ROaKbb0Mqkrk5kacSGyzpW+1KjvTjBmxMQWEBW+ufqHXq jDdngDZk1j8024fzEqY6EVBr9ncyj8H2FrYzD9aKGQTUrtYHk9lna530Zn9eWwEnxVmH 5mCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YCnwYlAv; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id d71si6995696pgc.113.2022.02.16.19.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YCnwYlAv; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 981E010E79A; Thu, 17 Feb 2022 03:54:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF8E310E75F for ; Thu, 17 Feb 2022 03:54:04 +0000 (UTC) Received: by mail-lf1-x12f.google.com with SMTP id e5so7538468lfr.9 for ; Wed, 16 Feb 2022 19:54:04 -0800 (PST) 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=RR1N4aPEBsDSrMkYWyN5C+eYSYGI+wdfjT+eCdTVa9U=; b=YCnwYlAvZ7/nS7LPvTABXHKm53V4PGUIaIBxHLF2KydqNgd1nAQ5/A/0ok7TobG8G7 vycvAQ2fh6huKnrHhICiT1Tr+0jbqcR3OAY136hQ6ZN7CxDJM0j00WsU92y9gutn8GIA 8ssmV6+Z0V3E0oYO+RpOiP0rIHJ4PzEFmNd6r/4UjKqqjQuSNVaB1QqdT33fzYE/qChu SA4smIhHj5xlikPyBa88uVO7J+7Kkp13NlHB/WMO/p9jI1P2FcrDJ3TlMYLwqTvtRCjX r1PTXx+QfICidSWTpCskAyDeMc6KOzYa0S6xfc2KG/oVhXojtHmewRZIEM/IQLtEZ+GH ON3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RR1N4aPEBsDSrMkYWyN5C+eYSYGI+wdfjT+eCdTVa9U=; b=s+bNzh6qi1SdWQexgd34L9svKggex1iRgGxgMvGgn/LUj0LS6cqNw6RWSXgtKOBRlY xmMt/xSFioqI1nfZ+DOKXc2QAFFE4iXsC39txiW0hUG47OL6XVCCF8yvO0acS49g7RGQ hYwiOSI4DbJm/fqTJGBYWPrGMV1NkundN/sUY3Je2uVVVH8X+aevJKaI/U1lwapbz4OQ QXlTtg5FJYBUKDwdS846SFNne8q1qHDyI1rs8oXrMIIlEEfh5RpEc4X3pFMRSxshGHu1 dc/+i1iyLYTsP40tBScxdlx4iTeacX+739da+7otUdWuARx33+3qA98fg+bg+Vi5y5TS FZJg== X-Gm-Message-State: AOAM530kM1qmmJaFipkVa92DAJvDFPbm432n3xwJKkLOWKDG/O4ZyuDq pZkfqnYq6Qc/IkpuRGBMx6c1/g== X-Received: by 2002:a05:6512:3157:b0:443:6407:ea58 with SMTP id s23-20020a056512315700b004436407ea58mr768650lfi.81.1645070043080; Wed, 16 Feb 2022 19:54:03 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h9sm1575454ljb.77.2022.02.16.19.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:02 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 3/7] drm/msm/dpu: remove msm_dp cached in dpu_encoder_virt Date: Thu, 17 Feb 2022 06:53:54 +0300 Message-Id: <20220217035358.465904-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> References: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Stop caching msm_dp instance in dpu_encoder_virt since it's not used now. Fixes: 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") Reviewed-by: Abhinav Kumar Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 5 ----- 1 file changed, 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 02d0fae1c6dc..16ae0cccbbb1 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -168,7 +168,6 @@ enum dpu_enc_rc_states { * @vsync_event_work: worker to handle vsync event for autorefresh * @topology: topology of the display * @idle_timeout: idle timeout duration in milliseconds - * @dp: msm_dp pointer, for DP encoders */ struct dpu_encoder_virt { struct drm_encoder base; @@ -207,8 +206,6 @@ struct dpu_encoder_virt { struct msm_display_topology topology; u32 idle_timeout; - - struct msm_dp *dp; }; #define to_dpu_encoder_virt(x) container_of(x, struct dpu_encoder_virt, base) @@ -2128,8 +2125,6 @@ int dpu_encoder_setup(struct drm_device *dev, struct drm_encoder *enc, timer_setup(&dpu_enc->vsync_event_timer, dpu_encoder_vsync_event_handler, 0); - else if (disp_info->intf_type == DRM_MODE_ENCODER_TMDS) - dpu_enc->dp = priv->dp[disp_info->h_tile_instance[0]]; INIT_DELAYED_WORK(&dpu_enc->delayed_off_work, dpu_encoder_off_work); From patchwork Thu Feb 17 03:53:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543354 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp88894imn; Wed, 16 Feb 2022 19:54:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxANI8Z6gVobGsfLZhKr3JIUkC3k3IHiK1G2f4SqVHm+FrLM4jm5ys1YhmFyEeGLyR7vq5g X-Received: by 2002:a63:3ecc:0:b0:36c:63a3:1be with SMTP id l195-20020a633ecc000000b0036c63a301bemr925172pga.353.1645070061062; Wed, 16 Feb 2022 19:54:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645070061; cv=none; d=google.com; s=arc-20160816; b=BGXHdB5yjV90XJp8rcVCgIkEkcAcftBeolvb6vdgoZU7lCNYwxm6oKfyxS9wjEsYHD x1W7Cwjq2aQWkHN1ldb8VrRsyOConJ+gHNXb8vQ39slDArhKX0tPNMr1io3lRkuAU4Tj eyvv9b5wGJ4LXfhyuAPghNfgJkPXdIW+G96l4WZLGvTYo1rr27UuoFwSL666/tcuzmNI ypr3EWeF5MH5CadSrcmwST3VBZKcUyxbJ0leJhug80eU3AjeI9gveTB6DWco61d5k+ag Lmcw1AKUHyVI79jXU+VHVp7y9MuqvFfO5IBaxefEjJ0jfH4i5cmtrN/6rKgMrTUWq1bJ MIyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=TB5gV/5sjwk2KpDc6LqRsCf8QAe1Jc0ZykwfWMWBIy0=; b=xeou9Ouvp94K/ua1OquPZmxKBmNxaU/XWQ+wE5Kaz87hGDKY/AvOwfzKrkVplXBD5w deLDFfiArUJg4qg8Su1HMLKCtZLuWxa6mlZu0u837NNVUwnpMA2hw2ntq3rz1tsJOoyo bngoxbxmNanXv1LuXPeP3yvgA+YvD6oG0cdb907wxK9FLRzV4tiJeVNjuefaO5Ml7Pge uLpPwGTPd1RsT5Mxy/yGLQmaVzWIIDrl0/Q5vyUnQVerPmQ91B3+DeHKjE1cZNE4SjAm ing66QMU2GVHxVY/otm+gLjBAT7355aGO3sET8ncqgCBChMWseGkVVrUHJ6MKl0oLUub xtfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NEkeyH1A; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id i9si21640344plg.270.2022.02.16.19.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NEkeyH1A; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AD0010E7A2; Thu, 17 Feb 2022 03:54:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by gabe.freedesktop.org (Postfix) with ESMTPS id A639310E789 for ; Thu, 17 Feb 2022 03:54:05 +0000 (UTC) Received: by mail-lf1-x12b.google.com with SMTP id p22so7576300lfu.5 for ; Wed, 16 Feb 2022 19:54:05 -0800 (PST) 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=TB5gV/5sjwk2KpDc6LqRsCf8QAe1Jc0ZykwfWMWBIy0=; b=NEkeyH1AK3AiRscVBVwxQydnYnI103BFdWInRv0N2AdXNqA53V2TwmqG+DjWxmhPX2 Zfy/AoF9vLVRDP0HvY/qXu/290VDBdfr+EO7pHabrNOFgotcQyBL48Bf3QXhpJ17aJOe EcDJY14VgmbnP42HhxA6GxR05FAm4A3ETm7EnxvkUIEGAS8BEN6SL3LHQ3ns101W6lqq oYZmIvxLJV0zDlRwH/EqnS+7dzmPp/uc0g4KMzGRUISQ/KSiKrsz6QRTbaCKBDENztZd 1umaFB6p2lkohTyg9PSGAyh7UfjLkpQGhgV1jLU8f/pYiKWQlm+dNtUBNocLmpIH+uXx AhOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TB5gV/5sjwk2KpDc6LqRsCf8QAe1Jc0ZykwfWMWBIy0=; b=sTYZGSsuzDFRhTlEfSSn3SXjfnA0QGkLYUX3l5jIUnass91jvaUQJ+hYGKGKAuaugH DxwYorK1s67ZRVcyNZFzJUyAIWOWrj9avQnF4ifJiIKNt2Qbn92PfvaMT3mPKA9u06Qk vtnhDjQBWB4+b/B2MVIG3pARP78C2pV8FF7b2BgPIGBfyk1U/aMJbSEAt3eTTu4ov3cg /a2WS1xMzFz5ZRGkqPLPjUr2j6lMlXxYZ1KiyTrus0d4pggt41gFhlQyo0y+LLREkHCa tua10d0yL0U4PdF/yz4YEcqChlYmF7Wu6rPPA4j05+jS52hidekKa9f++kQ/xiJ+d2LQ iMgg== X-Gm-Message-State: AOAM531XT6gikgUBO5gCEXGBqdzJK07GoB0Y0hf8r6nWpTXLe+F8+xSz zuIVcD17KrB5i/TfUw5OgVmlHA== X-Received: by 2002:a05:6512:31cf:b0:443:7eb6:3440 with SMTP id j15-20020a05651231cf00b004437eb63440mr772193lfe.367.1645070043961; Wed, 16 Feb 2022 19:54:03 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h9sm1575454ljb.77.2022.02.16.19.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:03 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 4/7] drm/msm/dpu: drop bus_scaling_client field Date: Thu, 17 Feb 2022 06:53:55 +0300 Message-Id: <20220217035358.465904-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> References: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We do not use MSM bus client, so drop bus_scaling_client field from dpu_encoder_virt. Reviewed-by: Abhinav Kumar Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 16ae0cccbbb1..f5bc15b2e56e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -127,7 +127,6 @@ enum dpu_enc_rc_states { * Virtual encoder registers itself with the DRM Framework as the encoder. * @base: drm_encoder base class for registration with DRM * @enc_spinlock: Virtual-Encoder-Wide Spin Lock for IRQ purposes - * @bus_scaling_client: Client handle to the bus scaling interface * @enabled: True if the encoder is active, protected by enc_lock * @num_phys_encs: Actual number of physical encoders contained. * @phys_encs: Container of physical encoders managed. @@ -172,7 +171,6 @@ enum dpu_enc_rc_states { struct dpu_encoder_virt { struct drm_encoder base; spinlock_t enc_spinlock; - uint32_t bus_scaling_client; bool enabled; From patchwork Thu Feb 17 03:53:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543352 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp88868imn; Wed, 16 Feb 2022 19:54:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpwazFKZSNAcV3SFwTQbKdbWfhkvsAdNEtFOPd9jaT6warsmJ/rxEYNqLFTdBHpGUg5OTT X-Received: by 2002:a17:90a:bf05:b0:1b9:cb97:706 with SMTP id c5-20020a17090abf0500b001b9cb970706mr5341146pjs.207.1645070055666; Wed, 16 Feb 2022 19:54:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645070055; cv=none; d=google.com; s=arc-20160816; b=u9dXjUraKNtrohvT9+VumC6ImSD9qrmNa55ReDtcMYIzgna5tpmKSU7e4CPQ2SQRWV EUTwjeQUOYBAhdZBIDkOK9jKTq+a0InvjlbGjQzUnbcrA0CBEEWSUb3NGhF5vVREntp5 H+EIQDx/F6+yfQqB0yXEL1cn/f5jbeq7vadbGYqcClXNrVVJnCQm9n5ikbJ7I4ZmZHU2 8SFKhuUq5SdUvK2VjuGfwOB6RqdDffZyqVmVbQG1UOGe4bciw67rIrt0hShu3OtWtSon HljxOfkSw4K/zidheyP+0sWkMVBfyxzDjY1i7LNRv9ZntDAoQbCm7Riu9tVTDxzgj+MI 5YrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=LeHMkFoNMl5wbtqitgFOACM/7bfBhWBbMxRXA4GQO3c=; b=gnL212JHgDXrSEldUO8HAAvSKumKwNVYepDyhZk1Wm27VKJH4kYhfYlVFHvPO5JCWI cAW1gutBkmudfCA2GK77pNJTmuLcOi0w58LFAvxcPlQgRU27VAxcGnLjj+yW+qeO3FRQ /4uwtNWcriKPL1HYGxE8i55YoHDrTH4OMcfolGmXXpeJfislQ/4sNw90HqfWFN06drIU cCI4pHkABR6dqRnAdfgngV4X+5RvnrsNnV6RFjPN5SEje4kiHdNkTb5US8O+RZ9KdoV5 q6jdrSAZ/bQ7ZuIYdp28HH64i1pQCPHDogzRuovqoZJO+tfSCn6JRqT41lifHKAe/93j hGpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xDioYM+n; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id s204si12322257pfc.228.2022.02.16.19.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xDioYM+n; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B94D10E78F; Thu, 17 Feb 2022 03:54:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75B8710E78F for ; Thu, 17 Feb 2022 03:54:06 +0000 (UTC) Received: by mail-lj1-x234.google.com with SMTP id o9so6379657ljq.4 for ; Wed, 16 Feb 2022 19:54:06 -0800 (PST) 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=LeHMkFoNMl5wbtqitgFOACM/7bfBhWBbMxRXA4GQO3c=; b=xDioYM+nRwpRvXfxQySDt5SdFQTGBo0mhX+hMfNRSjFUlxmIcFJBgc06uCvTNgCaG5 B3h66Uou9fIGxPMo7HyCPbgblIcWQMQaF19lmzr7KatsujdAqHOSehyAcilrOPbqfMy1 uA/I/5OPtdD5JY144Q9zebvyzW8GIOUQ12LIWttCDAzBmPMLXKiF1qumTDbOqVMbNg6/ 2At+UEGHcGbGQoFUYYaXoO61WBxO4tmmFePEl58tWdgAPXEU1VRDWLh/5r1Ni3SBGH8A OFjmUZPfKdRYBSO7qOPJYk5C44Mf9FPHMk1meyjqbcfWIwwK743Jn9HqW0cXUWnUq/wA 59pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LeHMkFoNMl5wbtqitgFOACM/7bfBhWBbMxRXA4GQO3c=; b=7mgkJ32ubGHdkRfaDhv7umZTdg+OIrTr0N0o6NgDVr2lw9TOm/95sCrgZLFnO2nbEB nc0sH38Us+mjLHPKkXOhqUQDm8lNsFK2p+eh/7Zn2WEGQoy8dfbiEm2kblkujUnIQW90 wpvy6n0eqfGtHtCLkTGvcX6Ri06QQe1yQa5Fz6FAZ1kFpLoRUmTZsrKvlLCOl8+lEICo FYDgYwg0HsvLvEwgncF2n/1jExqYEfZfzdsGeuwFAZlemkJ9ofiZJyLjxV9g69MauLWm HSLyTkaxgJgWI+kKtb6l3lCjz3I7iIfvA5Ust99C6g06bhi+ArNvGvZMasC4MATR0/4k Bk7g== X-Gm-Message-State: AOAM533o3So0ZF7cgUrzgQBZRR8wBNiz7LrvTztLZqoTm3YpeM3Kosze +TlMIGSVb09kfJ/Q9kcg6nD2sg== X-Received: by 2002:a2e:3c04:0:b0:238:eb48:5fc8 with SMTP id j4-20020a2e3c04000000b00238eb485fc8mr895475lja.148.1645070044755; Wed, 16 Feb 2022 19:54:04 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h9sm1575454ljb.77.2022.02.16.19.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:04 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 5/7] drm/msm/dpu: encoder: drop unused mode_fixup callback Date: Thu, 17 Feb 2022 06:53:56 +0300 Message-Id: <20220217035358.465904-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> References: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Both cmd and vid backends provide useless mode_fixup() callback. Drop it. Reviewed-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ---- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 4 ---- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 10 ---------- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 14 -------------- 4 files changed, 32 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index f5bc15b2e56e..5b2eeea37d54 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -602,10 +602,6 @@ static int dpu_encoder_virt_atomic_check( if (phys->ops.atomic_check) ret = phys->ops.atomic_check(phys, crtc_state, conn_state); - else if (phys->ops.mode_fixup) - if (!phys->ops.mode_fixup(phys, mode, adj_mode)) - ret = -EINVAL; - if (ret) { DPU_ERROR_ENC(dpu_enc, "mode unsupported, phys idx %d\n", i); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h index e7270eb6b84b..7b14948c4c87 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -84,7 +84,6 @@ struct dpu_encoder_virt_ops { * @is_master: Whether this phys_enc is the current master * encoder. Can be switched at enable time. Based * on split_role and current mode (CMD/VID). - * @mode_fixup: DRM Call. Fixup a DRM mode. * @mode_set: DRM Call. Set a DRM mode. * This likely caches the mode, for use at enable. * @enable: DRM Call. Enable a DRM mode. @@ -117,9 +116,6 @@ struct dpu_encoder_phys_ops { struct dentry *debugfs_root); void (*prepare_commit)(struct dpu_encoder_phys *encoder); bool (*is_master)(struct dpu_encoder_phys *encoder); - bool (*mode_fixup)(struct dpu_encoder_phys *encoder, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode); void (*mode_set)(struct dpu_encoder_phys *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c index 34a6940d12c5..45fe97fb612d 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c @@ -45,15 +45,6 @@ static bool dpu_encoder_phys_cmd_is_master(struct dpu_encoder_phys *phys_enc) return (phys_enc->split_role != ENC_ROLE_SLAVE); } -static bool dpu_encoder_phys_cmd_mode_fixup( - struct dpu_encoder_phys *phys_enc, - const struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) -{ - DPU_DEBUG_CMDENC(to_dpu_encoder_phys_cmd(phys_enc), "\n"); - return true; -} - static void _dpu_encoder_phys_cmd_update_intf_cfg( struct dpu_encoder_phys *phys_enc) { @@ -732,7 +723,6 @@ static void dpu_encoder_phys_cmd_init_ops( ops->prepare_commit = dpu_encoder_phys_cmd_prepare_commit; ops->is_master = dpu_encoder_phys_cmd_is_master; ops->mode_set = dpu_encoder_phys_cmd_mode_set; - ops->mode_fixup = dpu_encoder_phys_cmd_mode_fixup; ops->enable = dpu_encoder_phys_cmd_enable; ops->disable = dpu_encoder_phys_cmd_disable; ops->destroy = dpu_encoder_phys_cmd_destroy; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index ddd9d89cd456..1831fe37c88c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -225,19 +225,6 @@ static void programmable_fetch_config(struct dpu_encoder_phys *phys_enc, spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags); } -static bool dpu_encoder_phys_vid_mode_fixup( - struct dpu_encoder_phys *phys_enc, - const struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) -{ - DPU_DEBUG_VIDENC(phys_enc, "\n"); - - /* - * Modifying mode has consequences when the mode comes back to us - */ - return true; -} - static void dpu_encoder_phys_vid_setup_timing_engine( struct dpu_encoder_phys *phys_enc) { @@ -676,7 +663,6 @@ static void dpu_encoder_phys_vid_init_ops(struct dpu_encoder_phys_ops *ops) { ops->is_master = dpu_encoder_phys_vid_is_master; ops->mode_set = dpu_encoder_phys_vid_mode_set; - ops->mode_fixup = dpu_encoder_phys_vid_mode_fixup; ops->enable = dpu_encoder_phys_vid_enable; ops->disable = dpu_encoder_phys_vid_disable; ops->destroy = dpu_encoder_phys_vid_destroy; From patchwork Thu Feb 17 03:53:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543351 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp88856imn; Wed, 16 Feb 2022 19:54:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPK8p5cyIo8eEfMmB8rTb6h6FQKJxXFrUDBNXrbAGwS0KJSo9x5PsImJcR6MeuditEmJjG X-Received: by 2002:a17:902:d88a:b0:14f:1aca:d956 with SMTP id b10-20020a170902d88a00b0014f1acad956mr1114504plz.100.1645070053263; Wed, 16 Feb 2022 19:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645070053; cv=none; d=google.com; s=arc-20160816; b=zcIp73egPolb6rqfYRESj34Ke9pY9OhgZCV3YhzM5ihIb5SA0waW+AXJvehhYPmRrx AcOjkII1AgUBhZzhiRmAU8bkL+pQ4/LX3RUjsA+GZoIC8+/E2iAzVQTMq71Sw5gskXN6 kCgupVzU3wKGbYghUPfLBBHnM+IFaZ8r33alp8FV26iTsJilvJNhNMdPK2CRoG9skqF+ JfWDIlGFnoFjW6bZtIPjcq3b3bTjkz9XhCPCvuR1ernBvFQf8acV5Mv5HYRLoY4v7hlO 9eLsRPMDEqGitUD/lsdUYaOAHCPurfvC0hGbJqcMtQ5DOugRgDCyeTGnVE6ji/CYmdIS PCRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=YsUUu5BvoJNRI6RGzauZ8dUCGqmoZlgd2cuYyPZSuuo=; b=xFt8AY//rYrbGD3W3Ewp5BXWOl9qe9CC28h0lxLcS1+09hZECgfrYmu1bNAKYN/Ygk L8P+cw2S0Dba40ce3XEf/nUI1yMHTi/4Xxv+YYuVM5EzAldr+jODEXOIMiuGGAPHCji/ VcL17G6/9kXYRKqReJ5zGHquq7e6vW0Uu9eWm1ncnxUL1B4V5QJUEvL7uVrs73eq7mpH 8qIe/R5qsp5TijFs396BI3xajCxJ6zoVSrRLevFMpbLI277MugwqynI0hxnpzMnSC9xQ gCINxkB3Vb1h7H94zBNnYSVKJIiylFsPzVrLZ41spMb7OVqLVEE90iKIyCbBYMENJald Lu+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=l8wJRyki; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id b5si40058191pfm.93.2022.02.16.19.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=l8wJRyki; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A2E610E792; Thu, 17 Feb 2022 03:54:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4448810E79A for ; Thu, 17 Feb 2022 03:54:07 +0000 (UTC) Received: by mail-lf1-x135.google.com with SMTP id j15so7524135lfe.11 for ; Wed, 16 Feb 2022 19:54:07 -0800 (PST) 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=YsUUu5BvoJNRI6RGzauZ8dUCGqmoZlgd2cuYyPZSuuo=; b=l8wJRykiNIfm33vrkQZTVrnWzsapuUXU9j/oX4jKf2rmddED6IEDRo6FyBCmcNj2/k KtQ3R1OqOYqsH3TWfO8uVyX8emrAwU6dt7H2xpP5JHO0ekUiL7LSf2CUm6CE06ZdtXjm 3K2HM3orUL/ahC/MUSVWRBgBj0XHQdQMAovdUifhAiyK9FcmE1F+fT/XaaJILJF+aLnP ftXCRcXi1L8rOPRDKam94f5OgqE2epHheHc48Bhl2acaIIHesufyBGwlny41/ajLdApW 2eOOdJbkUOjORvju2l0HKkA3ErS7Gecqq34gRYG3JW7kJVlotLHT2A72ReDA1CvwUpqZ NXiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YsUUu5BvoJNRI6RGzauZ8dUCGqmoZlgd2cuYyPZSuuo=; b=rsaVLwC+XFPja/Kyoge3mtt7aJMpgekXG7U1ANp9PQjJmGYmJMhOPj2kicVP8sdEJK zyAPJ9c9pS0cic92kSaK17SSOB7MMqwdwyAVzvNk/5H/WezKgCAwTKCWVQsNbhCqug1Y CWX9gwGWMznNyKKSFJ5H82GDullrZOFBzpHK6j0OUcB/y8Wdy2mnLQeiWZ4dtwV3AZuE X9FPc8tiRNG8xq4c1x1f5LmojYzwyNp+89RS2r59ZuyQqTiysW+2iLG4e/ZCz9GCARIu eC6ZLILfw+aJamY670pkcnynghZp+xLKdldOthzl65fL/aKI1vjmu6Ire3A6RG1xZssx iclQ== X-Gm-Message-State: AOAM530FW9KdMBjRKe31DsgnDlX8+j25I5/1H5+6IWGLbZDwEY3p2sZU C5DZtNwBNaOv8YuMjDHZx4eN8A== X-Received: by 2002:ac2:58d8:0:b0:442:bc4b:afb7 with SMTP id u24-20020ac258d8000000b00442bc4bafb7mr752514lfo.99.1645070045525; Wed, 16 Feb 2022 19:54:05 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h9sm1575454ljb.77.2022.02.16.19.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:05 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 6/7] drm/msm/dpu: switch dpu_encoder to use atomic_mode_set Date: Thu, 17 Feb 2022 06:53:57 +0300 Message-Id: <20220217035358.465904-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> References: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Make dpu_encoder use atomic_mode_set to receive connector and CRTC states as arguments rather than finding connector and CRTC by manually looping through the respective lists. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 37 +++++-------------- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 8 ++-- .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 18 ++------- .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 14 ++----- 4 files changed, 21 insertions(+), 56 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 5b2eeea37d54..a8c9f5a4dd67 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -947,16 +947,13 @@ static int dpu_encoder_resource_control(struct drm_encoder *drm_enc, return 0; } -static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, - struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) +static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) { struct dpu_encoder_virt *dpu_enc; struct msm_drm_private *priv; struct dpu_kms *dpu_kms; - struct list_head *connector_list; - struct drm_connector *conn = NULL, *conn_iter; - struct drm_crtc *drm_crtc; struct dpu_crtc_state *cstate; struct dpu_global_state *global_state; struct dpu_hw_blk *hw_pp[MAX_CHANNELS_PER_ENC]; @@ -976,7 +973,6 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, priv = drm_enc->dev->dev_private; dpu_kms = to_dpu_kms(priv->kms); - connector_list = &dpu_kms->dev->mode_config.connector_list; global_state = dpu_kms_get_existing_global_state(dpu_kms); if (IS_ERR_OR_NULL(global_state)) { @@ -986,22 +982,6 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, trace_dpu_enc_mode_set(DRMID(drm_enc)); - list_for_each_entry(conn_iter, connector_list, head) - if (conn_iter->encoder == drm_enc) - conn = conn_iter; - - if (!conn) { - DPU_ERROR_ENC(dpu_enc, "failed to find attached connector\n"); - return; - } else if (!conn->state) { - DPU_ERROR_ENC(dpu_enc, "invalid connector state\n"); - return; - } - - drm_for_each_crtc(drm_crtc, drm_enc->dev) - if (drm_crtc->state->encoder_mask & drm_encoder_mask(drm_enc)) - break; - /* Query resource that have been reserved in atomic check step. */ num_pp = dpu_rm_get_assigned_resources(&dpu_kms->rm, global_state, drm_enc->base.id, DPU_HW_BLK_PINGPONG, hw_pp, @@ -1018,7 +998,7 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, dpu_enc->hw_pp[i] = i < num_pp ? to_dpu_hw_pingpong(hw_pp[i]) : NULL; - cstate = to_dpu_crtc_state(drm_crtc->state); + cstate = to_dpu_crtc_state(crtc_state); for (i = 0; i < num_lm; i++) { int ctl_idx = (i < num_ctl) ? i : (num_ctl-1); @@ -1067,9 +1047,10 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, return; } - phys->connector = conn->state->connector; - if (phys->ops.mode_set) - phys->ops.mode_set(phys, mode, adj_mode); + phys->connector = conn_state->connector; + phys->cached_mode = crtc_state->adjusted_mode; + if (phys->ops.atomic_mode_set) + phys->ops.atomic_mode_set(phys, crtc_state, conn_state); } } @@ -2084,7 +2065,7 @@ static void dpu_encoder_frame_done_timeout(struct timer_list *t) } static const struct drm_encoder_helper_funcs dpu_encoder_helper_funcs = { - .mode_set = dpu_encoder_virt_mode_set, + .atomic_mode_set = dpu_encoder_virt_atomic_mode_set, .disable = dpu_encoder_virt_disable, .enable = dpu_encoder_virt_enable, .atomic_check = dpu_encoder_virt_atomic_check, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h index 7b14948c4c87..6309c5e30d20 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -84,7 +84,7 @@ struct dpu_encoder_virt_ops { * @is_master: Whether this phys_enc is the current master * encoder. Can be switched at enable time. Based * on split_role and current mode (CMD/VID). - * @mode_set: DRM Call. Set a DRM mode. + * @atomic_mode_set: DRM Call. Set a DRM mode. * This likely caches the mode, for use at enable. * @enable: DRM Call. Enable a DRM mode. * @disable: DRM Call. Disable mode. @@ -116,9 +116,9 @@ struct dpu_encoder_phys_ops { struct dentry *debugfs_root); void (*prepare_commit)(struct dpu_encoder_phys *encoder); bool (*is_master)(struct dpu_encoder_phys *encoder); - void (*mode_set)(struct dpu_encoder_phys *encoder, - struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode); + void (*atomic_mode_set)(struct dpu_encoder_phys *encoder, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state); void (*enable)(struct dpu_encoder_phys *encoder); void (*disable)(struct dpu_encoder_phys *encoder); int (*atomic_check)(struct dpu_encoder_phys *encoder, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c index 45fe97fb612d..6de298d521ce 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c @@ -135,23 +135,13 @@ static void dpu_encoder_phys_cmd_underrun_irq(void *arg, int irq_idx) phys_enc); } -static void dpu_encoder_phys_cmd_mode_set( +static void dpu_encoder_phys_cmd_atomic_mode_set( struct dpu_encoder_phys *phys_enc, - struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) { - struct dpu_encoder_phys_cmd *cmd_enc = - to_dpu_encoder_phys_cmd(phys_enc); struct dpu_encoder_irq *irq; - if (!mode || !adj_mode) { - DPU_ERROR("invalid args\n"); - return; - } - phys_enc->cached_mode = *adj_mode; - DPU_DEBUG_CMDENC(cmd_enc, "caching mode:\n"); - drm_mode_debug_printmodeline(adj_mode); - irq = &phys_enc->irq[INTR_IDX_CTL_START]; irq->irq_idx = phys_enc->hw_ctl->caps->intr_start; @@ -722,7 +712,7 @@ static void dpu_encoder_phys_cmd_init_ops( { ops->prepare_commit = dpu_encoder_phys_cmd_prepare_commit; ops->is_master = dpu_encoder_phys_cmd_is_master; - ops->mode_set = dpu_encoder_phys_cmd_mode_set; + ops->atomic_mode_set = dpu_encoder_phys_cmd_atomic_mode_set; ops->enable = dpu_encoder_phys_cmd_enable; ops->disable = dpu_encoder_phys_cmd_disable; ops->destroy = dpu_encoder_phys_cmd_destroy; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index 1831fe37c88c..0c07db5021eb 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -348,19 +348,13 @@ static bool dpu_encoder_phys_vid_needs_single_flush( return phys_enc->split_role != ENC_ROLE_SOLO; } -static void dpu_encoder_phys_vid_mode_set( +static void dpu_encoder_phys_vid_atomic_mode_set( struct dpu_encoder_phys *phys_enc, - struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) { struct dpu_encoder_irq *irq; - if (adj_mode) { - phys_enc->cached_mode = *adj_mode; - drm_mode_debug_printmodeline(adj_mode); - DPU_DEBUG_VIDENC(phys_enc, "caching mode:\n"); - } - irq = &phys_enc->irq[INTR_IDX_VSYNC]; irq->irq_idx = phys_enc->hw_intf->cap->intr_vsync; @@ -662,7 +656,7 @@ static int dpu_encoder_phys_vid_get_frame_count( static void dpu_encoder_phys_vid_init_ops(struct dpu_encoder_phys_ops *ops) { ops->is_master = dpu_encoder_phys_vid_is_master; - ops->mode_set = dpu_encoder_phys_vid_mode_set; + ops->atomic_mode_set = dpu_encoder_phys_vid_atomic_mode_set; ops->enable = dpu_encoder_phys_vid_enable; ops->disable = dpu_encoder_phys_vid_disable; ops->destroy = dpu_encoder_phys_vid_destroy; From patchwork Thu Feb 17 03:53:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543355 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp88928imn; Wed, 16 Feb 2022 19:54:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3o/Kcb08W7bj7WiMOym91nfI/VXkA+ekszE2g1gSw8sgldk30QMaFyZbEPvpSvQCEMgIB X-Received: by 2002:a05:6a00:1a47:b0:4e1:5bc7:840d with SMTP id h7-20020a056a001a4700b004e15bc7840dmr1286369pfv.10.1645070065093; Wed, 16 Feb 2022 19:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645070065; cv=none; d=google.com; s=arc-20160816; b=hgLOLwb8P1RMj6gAZgkIAZCFv1lOj055WjageJ8Alk5X14B0omEEG7uTmnT0kSbxiG Epd344LRbFgbATpTexkIHtUYnsqP/nMAzlZk3HtLMq/HD8CijiR9hkjq/T/Ta+TYrY77 aMaeDX6bN9Ia3FWub/V9KQ+UqvQv6J64sMJt0bN3xzRyotI2LSNqgT3NlW5HOQ1gbcyu fXoxZCtvqn7YIu0rr+SYMBFvJD6jVX1CyEHKM4BOi1jYiX3WjBl51CeGbY377RZyXS+x 8Q4Mo7287kNI7pRz+qDUevNQwzbwy7jyAUNJytrp/BBC8o2CGMXLeoRoUwgf76B8t5aK uTcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=xedxWSvx9ArNTGyT36JcyEF8rqvDUNlS4BZYi2FfR8w=; b=TQH9pK82ZoM/NUQxs5rHG5crW33HU129scefyxUv6KdAoip0iWZZ/Slvine/s9LCz8 j8ZmuYrdXTUpi4Ypc/6tomwAPby+XjAdZ2D/pKdVTG6escpPd1wQiXPVIL3oF2tyXOwG e7scGXEt2l3QxvZmjBvViFgAA2eN1IwVf09zsUWtu3HLlHcLouAoQ3/I4/m/a4XGKaCf 851+IgGUR18dMco5bixpWvM7ydAr6Zf7oQsonO8o8Y5q158O3Lvtzfi0TF9x3VTym5/t 2Fjvwt/HXDQni9KTZl0rZQUBVxGroz9sSkml3WeQQO3Mzir7mp3VFJiFyaFDNkdknHCU VvAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rVZE9qBJ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id b1si4909004pls.447.2022.02.16.19.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rVZE9qBJ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7439410E75F; Thu, 17 Feb 2022 03:54:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0047710E79A for ; Thu, 17 Feb 2022 03:54:07 +0000 (UTC) Received: by mail-lf1-x12e.google.com with SMTP id b11so7531724lfb.12 for ; Wed, 16 Feb 2022 19:54:07 -0800 (PST) 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=xedxWSvx9ArNTGyT36JcyEF8rqvDUNlS4BZYi2FfR8w=; b=rVZE9qBJZLndJhlNOKlLZzK62wUYGptsMSkrLS+NeMLGQIIQqeJmvJ+O4UqFAPISYO 7kd550UaHIzijTAPvJ1yUcOeUkXT9uI4LOdTdBdphKvTnQuKzez8knxMWAT0lJYwVGmi tBwVt2REaCirHL1qVixNbTznBuxiwE1bd7Z5/bJVKhiS4gjMgOnoOiA6SVCQEvwwYfOH 4OiZRN/X+7vaZ7C40KmtArWt718BYiLy28tH1ccRNhjDQGfQ7rhCMMAOHkFJQjJWnzbY 2nInpAuMxtnS64Op02a993VpoW+UKQCu3QXaFU3LvCiPPYhfd5RthqjMqZ0qsKXhcepr g+7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xedxWSvx9ArNTGyT36JcyEF8rqvDUNlS4BZYi2FfR8w=; b=FQJ6Kehu4Je6bLkjBzwU5V2FjII/arrl+DrgHvN6TrYCtgI87i1TDDPcwEChhyqcdQ OiHEWu8PNXXZZfGIvuaZKhnqcCUWoNtKSXBzEkaIg+JO0eUm0tpJaGrXIzUCyhCvgv2r 8fHXXV4fm4cfNob443X/+0/57LsFQG214VA+2anuT43qZc0P3dgqFtxbbHKSDxDfyZox i5lU0l10iybvDWN8VfJTwNxYDIIN4FyvWX/7siWszIVcb+RjeqyY3sqyKRn81PfaLAgr t5lGvlZjgk7bVmH2tzFtlo605MA++OQxktJlZK4/EjcLoGS4suk718i+nZNcH1CvQCl4 2KkA== X-Gm-Message-State: AOAM53027OMki2yG/W55JenAlW3Z3l/WN84XuHbIAz8QvqTGsO9ILjAu 7YryfoK5tXfBWlU7X2CL21Y6WA== X-Received: by 2002:a05:6512:104f:b0:443:15b3:ba57 with SMTP id c15-20020a056512104f00b0044315b3ba57mr825472lfb.239.1645070046318; Wed, 16 Feb 2022 19:54:06 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id h9sm1575454ljb.77.2022.02.16.19.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 19:54:05 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 7/7] drm/msm/dpu: pull connector from dpu_encoder_phys to dpu_encoder_virt Date: Thu, 17 Feb 2022 06:53:58 +0300 Message-Id: <20220217035358.465904-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> References: <20220217035358.465904-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" All physical encoders used by virtual encoder share the same connector, so pull the connector field from dpu_encoder_phys into dpu_encoder_virt structure. Otherwise code suggests that different phys_encs can have different connectors. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 11 ++++++----- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 2 -- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index a8c9f5a4dd67..b23f12eb0e0e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -143,6 +143,7 @@ enum dpu_enc_rc_states { * link between encoder/crtc. However in this case we need * to track crtc in the disable() hook which is called * _after_ encoder_mask is cleared. + * @connector: If a mode is set, cached pointer to the active connector * @crtc_kickoff_cb: Callback into CRTC that will flush & start * all CTL paths * @crtc_kickoff_cb_data: Opaque user data given to crtc_kickoff_cb @@ -183,6 +184,7 @@ struct dpu_encoder_virt { bool intfs_swapped; struct drm_crtc *crtc; + struct drm_connector *connector; struct dentry *debugfs_root; struct mutex enc_lock; @@ -1010,6 +1012,8 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc, cstate->num_mixers = num_lm; + dpu_enc->connector = conn_state->connector; + for (i = 0; i < dpu_enc->num_phys_encs; i++) { int num_blk; struct dpu_hw_blk *hw_blk[MAX_CHANNELS_PER_ENC]; @@ -1047,7 +1051,6 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc, return; } - phys->connector = conn_state->connector; phys->cached_mode = crtc_state->adjusted_mode; if (phys->ops.atomic_mode_set) phys->ops.atomic_mode_set(phys, crtc_state, conn_state); @@ -1081,7 +1084,7 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc) if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI && !WARN_ON(dpu_enc->num_phys_encs == 0)) { - unsigned bpc = dpu_enc->phys_encs[0]->connector->display_info.bpc; + unsigned bpc = dpu_enc->connector->display_info.bpc; for (i = 0; i < MAX_CHANNELS_PER_ENC; i++) { if (!dpu_enc->hw_pp[i]) continue; @@ -1185,9 +1188,7 @@ static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) dpu_encoder_resource_control(drm_enc, DPU_ENC_RC_EVENT_STOP); - for (i = 0; i < dpu_enc->num_phys_encs; i++) { - dpu_enc->phys_encs[i]->connector = NULL; - } + dpu_enc->connector = NULL; DPU_DEBUG_ENC(dpu_enc, "encoder disabled\n"); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h index 6309c5e30d20..43ce56109c41 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -178,7 +178,6 @@ struct dpu_encoder_irq { * tied to a specific panel / sub-panel. Abstract type, sub-classed by * phys_vid or phys_cmd for video mode or command mode encs respectively. * @parent: Pointer to the containing virtual encoder - * @connector: If a mode is set, cached pointer to the active connector * @ops: Operations exposed to the virtual encoder * @parent_ops: Callbacks exposed by the parent to the phys_enc * @hw_mdptop: Hardware interface to the top registers @@ -207,7 +206,6 @@ struct dpu_encoder_irq { */ struct dpu_encoder_phys { struct drm_encoder *parent; - struct drm_connector *connector; struct dpu_encoder_phys_ops ops; const struct dpu_encoder_virt_ops *parent_ops; struct dpu_hw_mdp *hw_mdptop;