From patchwork Tue Feb 15 14:16:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542791 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp502042imn; Tue, 15 Feb 2022 06:17:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXvP6dO2xhRwyxnwgRw0vh3abuU9hL7jwaqt7eAAIXlSjhoYXfeLYIB4lSuS3G7KjoBbkE X-Received: by 2002:a05:6a00:a87:: with SMTP id b7mr4366508pfl.51.1644934629587; Tue, 15 Feb 2022 06:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934629; cv=none; d=google.com; s=arc-20160816; b=oBHtj+x4TUsql0heFukFW7k/fRe17BMmRYvbboh9ijxWZQbKNIlqpLNQe+tsbrMGCf RT8xEcOhgBdnd9yxHu94Ywtbt0xdTvFlDJj+qxQvE8t+t6frCWX7HjNUnD3c4xMBCybb KfLJ/zEQxGrW9gPR6Kw9yTLdfqAM3E/BDkQuCBLwrfufJ1tt2ldkU6FjLea8kDM4LAb5 h9reBuvaz0Yv0Wrap965Nmy8H4vWEnWZkckQnTel1P8civpIrsJN0EBrDEQZZvW+wcrV 2+T3tBuFhsQFIDD1v3ZcceY7z756IYl0F+nqUvVDlMZLYwPNfAs7mvtD+eNISCdXwaB6 s45w== 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=PSfsRzJkEgK/Vmp9eGzQeRkfQQALkinNmbtc1FEuOMY=; b=HuzyolIi2Wjk9w+u7IxTBD+zsF1hu/ti80CJHUmO6YsMorBD/TDuhaYp5HPYaCBB18 TkHVI1X7q/IdMIf5rWSFH6bwYvOhEldSQsJRnUjTkQOprVOYl3J473Q/O5mvIyjJ6f1R S8h1YSii987hEz9cQg5059Kx/GY6KjIP2+QJg9dZd2+OOAoh3OLk8vZVdLFXApyjvGwe lT7s5+m4DRfBNYOjledy6tAYdTgNti8FWQ5zb4TeL32hEk7IalpQ7bzGwQ7V8D7r9oyh s1e9cEhOyWkTxOdLu6K5Mt2YljxTAC1paXhBIOdufoddts293/QRyIK7A2stADl2LKgo SM3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=m4CaCdv+; 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 t71si2591774pgd.663.2022.02.15.06.17.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:17:09 -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=m4CaCdv+; 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 03D1D10E57D; Tue, 15 Feb 2022 14:17:07 +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 1D55710E579 for ; Tue, 15 Feb 2022 14:16:47 +0000 (UTC) Received: by mail-lf1-x12b.google.com with SMTP id g39so13923466lfv.10 for ; Tue, 15 Feb 2022 06:16:47 -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=PSfsRzJkEgK/Vmp9eGzQeRkfQQALkinNmbtc1FEuOMY=; b=m4CaCdv+n7670jVhY+lvnPejzKPDMxc3DkfOmhG8MrdwGRZZSMsj8xzqC4VZgoXEEa g3woR+hHqj3q1mnwZ3uASTBu+ms+weVqOXRoyjq/KXDlWrUzYxJIz++OHKI5Q1d4IvEd fRVkAz5jq0lRn/aRj044UjUiIZ5Z7JtUn4zi+ZKNEHKkdR2cIchO+n+YA9qkWUBVkd3d G0eep/nHlXcvOtDlXRj9wTPwaoblMk59vwfHbOFLib4SeSw71sdm4/2r9c8tzlIdl+wH 14pzCi0VzWvidwPOFIztOnF9d7dubWVmRIBhGRGcp1gCxKNM4lirRr9ty7cjldvW12D8 dYVA== 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=PSfsRzJkEgK/Vmp9eGzQeRkfQQALkinNmbtc1FEuOMY=; b=5hER9D0LF0CTsvkhvdTNncTpv7y6RYZMziuoHgs+qoxdXy36a/N6g0hnGBlln5a9PX M/kb3kw1S++kAM0P8SE6D5KFV3MWLD2OkTnMipEnUgaU1RfwsVt7UhIfVXLIZ91foMuV GzFY35f7Y+j7RIR4P3pqA1kppPlICo6DBUSYA6qABaPCN1bf8wwDR3/JrPCWL03MI7wz E1foloqiEYIorZ6lPQmK+8/pqwrv83nocWtVhQKZKrGX3lvrEbfjy1nXdefKtlqJrHl0 YOYqepBi9k/YTEH70t1o0IL1QxlrWVjCO/ymzb+4uZ4eA4g6Lp3x/EBfLfv2lgrUopss GqPg== X-Gm-Message-State: AOAM532Nkfc1JavEifv2Ft0RoLUcRVHDDC7XPvzcy5XhXXomG2OcBz/k OSROiwX1H9qA9M7OXdJO7P5J7g== X-Received: by 2002:a05:6512:104c:: with SMTP id c12mr3217127lfb.418.1644934605400; Tue, 15 Feb 2022 06:16:45 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:44 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 1/8] drm/msm/dpu: fix dp audio condition Date: Tue, 15 Feb 2022 17:16:36 +0300 Message-Id: <20220215141643.3444941-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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") Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd --- 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 132844801e92..c59976deb1cb 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 Tue Feb 15 14:16:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542789 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp501971imn; Tue, 15 Feb 2022 06:17:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwOmnxzGDPUp5B51iEpakhn9iH0oMTs8sNs2MwnXuIWrtRW5tigyYLxZsf39+MmfrR1LUA X-Received: by 2002:a17:903:40ce:: with SMTP id t14mr4463761pld.160.1644934625636; Tue, 15 Feb 2022 06:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934625; cv=none; d=google.com; s=arc-20160816; b=CPsQLAFeWG+iLCeQaulM7TewZmuPkW1n2de9oNUWbb1s3S+mq9bmLvtf5KnfFmtssM sYiOUulUkQN7M9QzJM9hecRdgRvoyov3igELVEfNcf7634VyERFOW83lV/57fWzpU0Qs 7IGZa022EALKqyEvgcvSetFxXPbKbK2gGP/WHk3Fc7etMKOXW+aq525xcycFSflJ1iE2 tvk9R6nSyY+tWAYi01g9h01n/w10cfqdMYR1oP+GWIa8Uvof6e1OXYgW/PFB73391Cvp q8pGstA4t3DC6AER5gTSybTCgSmd9+xyBQz6uhdNEDBp1hFNDt5KsivcEIaLoSTMx7qf uuWw== 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=hYRG8XeM7V1EDX7uymsrwJU1RATDlAUQXVMD/dRoT3A=; b=RTUbDt7VOPvsli/+yePj+iQAoObaSsWuEEoZInMGUhQJYjaQiN11K/MiLetbx/XLx+ Ns7hEUq8o9jqzhuxTkp60gGcO0o/WFfW51ijbhUOcygEKa5aEAao+fJT/GZruF0zCB1J 89yF0HXILGHdA9R9cmvyp59yNwQcZTIreE7ie/FYvcUzvqJCaz6YmkupQSQzhVsUpll+ Rup3HNWBN+c7X3cFkvNay4nQpam31aufUpC69M76YxhbBJGPRByF3lseCRK1Bdi3vFIS vdDLNOmQf4wONaalhcWgAZYpFDT83mtvprc2KXB8ZBsZklaR4hEPRD08eF7lwmuKHI39 o7yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bXL4YAbS; 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 c5si325967pll.274.2022.02.15.06.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:17:05 -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=bXL4YAbS; 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 5348010E602; Tue, 15 Feb 2022 14:17:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE15310E57F for ; Tue, 15 Feb 2022 14:16:47 +0000 (UTC) Received: by mail-lf1-x130.google.com with SMTP id e5so7336618lfr.9 for ; Tue, 15 Feb 2022 06:16:47 -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=hYRG8XeM7V1EDX7uymsrwJU1RATDlAUQXVMD/dRoT3A=; b=bXL4YAbSWX9gQVtW2ksFkHQI0+/CYTR2mgdEqd2taCeCFMG6zyWotY96YaUJaHUFSN Q6VW1v98o3pf25SBSEnE7vyIbuzrNBB15a34deX2Xdu2ivzVN9Xv0vb/Q/YuOxsZPjqu KTGetEh5XBY3FFdOXRVYaE13H6cFmXHZYUD6rsmTIqNXjttWu5f4xg4T1o+q8wMRK67f YGQGAtyYHZvUOIDJyKIVW3LFZdoYW1zNxZ+mUwzOWZ4xy8dOgLjCZ6pZaUNDzX/3hvY+ iHLfF7siobPaPWzKmQ26ENZN41J/CWew1SkXnnWupiNPTJrphSxZT/soOkbZcytVcyur tGyw== 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=hYRG8XeM7V1EDX7uymsrwJU1RATDlAUQXVMD/dRoT3A=; b=oPgqm984I5CoB7d8qLg9yEPKGWAYwSR8tCgQubY9I0QRH7H7l0Gp0fR9NLWcGvxniv tkfKhHb8m1YJj7XDBnpGT14fKng6SuMxlmuqog8H/NzouKPRV3SRrDs2lEowPE+ThDkq cZuftnY6XBAE2lgTuUNjYxksUAlLwcfPYE/JQoThuP4A19wqBR9V3Aj0Mn6uhVJp9kgO ARo/a4sHB3cOeVQjP/VAXbIaVXzorV6fsJ06It7Y9Q/xgO70Yytq1HEVohVQ0rPFBbnT 8H0zNJNVE86/FJzojZxKxwPX3Zc3wLCTNHEpHM2mbE8QxDPMxGinW/TktYDQ5K5fldx6 /HIA== X-Gm-Message-State: AOAM5314kCD/QG2BjlV8N9x7ybGUD1rgp2A14Jow52pTDq7EXXFaGjZs D9tq15qhuaZUlu8NlNTzMcAfyQ== X-Received: by 2002:a05:6512:4012:: with SMTP id br18mr3072889lfb.533.1644934606241; Tue, 15 Feb 2022 06:16:46 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:45 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 2/8] drm/msm: move struct msm_display_info to dpu driver Date: Tue, 15 Feb 2022 17:16:37 +0300 Message-Id: <20220215141643.3444941-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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 Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd --- 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 3ab19775a5c3..57b0cd6f917e 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 Tue Feb 15 14:16:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542790 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp502024imn; Tue, 15 Feb 2022 06:17:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfuzeYCmq9VbkXdmosSfMyuE2ohWoGnDsNeiH92L0NJfXNRtSYzvuzSVvstspmwUMWy6yf X-Received: by 2002:a17:90a:46cc:: with SMTP id x12mr2753060pjg.105.1644934628412; Tue, 15 Feb 2022 06:17:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934628; cv=none; d=google.com; s=arc-20160816; b=afmeKNvJVpYfQ52+1fEaMu5Zt3YG+OwSctwqMTxL6E2GGD25GbgR5h77OjAR/y39/d Nj9Ll14CjKWJjKdzbuttbEra0wX4aGZxuGw6qG8tKVhQ478svNh6mD45tscJOeK1nTKc 7aQfEDFOxEtMgYlZBgOEH/K36G/kUIhsDifTcgSEK3j0kZ5L5I1itwJu5yM7QerkpN6A oJnNX+ru0DK8pN+L8O4qHk/KH+pM9mtgKqRRZ0S4AZYf709Dzr1MEBYqoMWj6YUgIaub +ye/IB32lkWZjykjydE40jkP3qkhrssGMD+5CoVBkvbwY5HNP5DXpm9jmqOqCgtFOqNr Cbkw== 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=SfdH2ncwmJDrVRdbfNY5r2Qh/hOw/XHnUYkKFPYNhyM=; b=QYyJaRAd2rIkv0Z984ySc+sbpKmmprdwl9jpLt4qfFaILkWDi2LtWT8O2v8RpCVDkn Ah+WPkBJVbH1UypoL57eZMCIe4OMYM6VXekhXqXerQ6hfI+jDj66NKsMJG81+/2nqj0d WenSsCo6Zp7AvJixikoJSirRsI1LaYkR4a9NELTq1u5OtsATzDHXHwv8/VATMAvJixTw eITZUVshynBL3+GZLIcvL7adPnk721C/r60Ld5rcWoa29Sd7vM9gP2qOfOB5p6NtqAZL +H5y621EvNA0pBH8EPT4WLpvrdad3+pVkEA/kTtEIxJBz/GrcKj2n1Z3CS+SYoux9jVP fr8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=psXOCZob; 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 t185si2908196pgc.97.2022.02.15.06.17.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:17:08 -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=psXOCZob; 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 A96F810E53A; Tue, 15 Feb 2022 14:17:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6061510E5F3 for ; Tue, 15 Feb 2022 14:16:50 +0000 (UTC) Received: by mail-lj1-x235.google.com with SMTP id c10so14245905ljr.9 for ; Tue, 15 Feb 2022 06:16:50 -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=SfdH2ncwmJDrVRdbfNY5r2Qh/hOw/XHnUYkKFPYNhyM=; b=psXOCZob0jpOWF7asuePKZv4UaAI+c7tjgwZ2VMSWYNIHWrplAjMRglhd1F/GuHwdO fvzJteV13aqlfjbm+xe2i4eVNLwUd8aFaQIhG2GYA9eTz9BkfbbO22Fx5dbkvggU1aLi 4xuBsSnwM8IUTtgnf/F75xhfr7hMYJwdfmhSKdhDAmlQe4UYEzWBv59SwtqdenbMHwRB DW9Y+80j2IMssDKy9S8KKt5h4DI7Fs0fYGiaP2ws4ZrkjTs6RiJxvxArBXRzITNEZtMc SB2ClYIQm0Q4h/LBPhdBr6mKIXGhe/9qEYYZayPYQWhya/hRYlecFQ7rEq5EGSXh2h8a rUlA== 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=SfdH2ncwmJDrVRdbfNY5r2Qh/hOw/XHnUYkKFPYNhyM=; b=QfCQpV48e+Cb/11ZIt6iWkyVDbFett90aFsoSem35jKpOlGuJZyhgpQakBUw4JiPzv tABSZvlRLFj9IYR1vu1PnAr/rlXKQSGf44xb+ZwcYdlPDBfC9KMYT5zabhU000oiE+79 01A0JRbPb2lLoppNbusnZhKh/xP9NYe94hiPjf+wE1mlbsKibi6ScRviOmeDhfG5ARU8 ZEIYhmDlb/KlSw1jEVHS7TMSQ0OMvpcx3RLMAHoCZhW/FbXdy4EYnfowMDfHEHskZysy 6osLxe66CF3PnrDS/ZwV5K7oDMvmpREiDjjff4MFlfQDeaZgZIf+GWQtZQQBTKgvDyVl hAEw== X-Gm-Message-State: AOAM5309GfU4/KBryuRjjRfpzx3PctGlvmz1FBhiugBqRANH0dKF/DxL R0Ab6j6pVsI6WQIgw84v7EYE/g== X-Received: by 2002:a2e:88d4:: with SMTP id a20mr2735763ljk.187.1644934607054; Tue, 15 Feb 2022 06:16:47 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:46 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 3/8] drm/msm/dpu: remove msm_dp cached in dpu_encoder_virt Date: Tue, 15 Feb 2022 17:16:38 +0300 Message-Id: <20220215141643.3444941-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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 Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd --- 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 c59976deb1cb..401e37f50d54 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) @@ -2123,8 +2120,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 Tue Feb 15 14:16:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542784 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp501810imn; Tue, 15 Feb 2022 06:16:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJkyraOU8EMa0uloDzMe8lfYXWKm2eWXAHvJIvCKDLOqcbLxfb45wFJdj6F3jf+HYyNDgU X-Received: by 2002:a17:90b:1bcf:b0:1b9:b03f:c34c with SMTP id oa15-20020a17090b1bcf00b001b9b03fc34cmr4533451pjb.141.1644934614361; Tue, 15 Feb 2022 06:16:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934614; cv=none; d=google.com; s=arc-20160816; b=q45Mfpb+XG3GUVjukIbwfRhDEGbC0Arh2DiGQRMlBfrZdzG0BR2FfvmxvXJMxPeY6J 8v0qJG4PZYB5M5v7EAngo1QSw0T/5oUCd6h2LSO4BJnZBppjRGqifw4YbBQfpiVKLwyG soHu67hW2fJSUAfMAQ14BGk3afHrX+qW5rdcMwXn3d101+flcnfnObgskW4+wTNDbW16 RVz9yWzjmOtKZpad9vyS4tf8agA6EZ2NArtVgqurqnaCpJYw5mMbJrNjU3D6XBzy9Olw cR/sylpza/IWRGKR0pA8RKJzCLwxA8ABLEHZLIgpzP8sVUnHdkyhAuqm8vF9xXXM4Asy 78aQ== 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=7Wgv1r0Ja4kv+q7R33vFu+J3TG98XPEyfJ988+yvLp0=; b=FF1XWR9N+ZpJMimgmEwziCUgqLr7+JM4r9EpBGe1CxTUcq1OM9Js7cPXrAYsVKohRA TjrjEQwppZW43/ZeyQo4HpWhX1jqNhngQNvz/Cw4dZdSw/gwEVSq3G3/RZMFpCj7Wlyk lhg33j6nLtEGi3LW2wSgasJDzKsNl/zB5WxCdKV8tGXZ6CuklN7UE0wus2Jt2RKaPtDW kCyQ91amjzttdJ1Gi6ZFOk6+si4weotOWMlS9/6mE6wBQIaQ/85fF6JVqMWquJFA10yf yxE3EbkDfs/oaTs2SpK1tEmLjQrZeDnVmDHyDAGfbvjLhAQWP9O6MOEqI6bpJ0waMBVS 5vig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YRJzRgM+; 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 h14si37278273pfc.358.2022.02.15.06.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:54 -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=YRJzRgM+; 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 839AE10E5F6; Tue, 15 Feb 2022 14:16:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C93F10E5F4 for ; Tue, 15 Feb 2022 14:16:49 +0000 (UTC) Received: by mail-lf1-x132.google.com with SMTP id f37so10857653lfv.8 for ; Tue, 15 Feb 2022 06:16:49 -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=7Wgv1r0Ja4kv+q7R33vFu+J3TG98XPEyfJ988+yvLp0=; b=YRJzRgM+5jP2zo5GkV7gS+z+z+6IOEZt1xyw7ohc2uvazVeQhg5WHG+PpzJ7Uvrvkl BvgMRiznElPgkeaZnCkXxb2w+/fBcuu4H6P91y5mgnaHISH+W+aUReEStTAmXTTRUyYu 9hY6FgU3iqSsBonW6/EZ+I4jFVGnTtXdHj8d42r/J4kDdjFH3X3WQDTLEYcqnkx4x+zr IKhBUvpTtzpPwKAgym7/TuSbdPtwWmxp8HUmDEjgmDMIfA7CYpSH06DLVNZQ2mc5m90L Xq+UTArHpEgxzrjVQpcg2DlUeg+YbzShSjlBzI7quYhPIEg55eXNk8FIsY4NJIoGe0NF 7jFw== 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=7Wgv1r0Ja4kv+q7R33vFu+J3TG98XPEyfJ988+yvLp0=; b=oCxyNyB/lTEJExU7eDc/TW1BIOO8MV+2/wbl2RA++Q7NEjEwVZtqlr9DrTxv6SpiN8 JWlz+YUCccK3Ha4i8BZ7cYY74YeM+erZjmb0wLt954/XwYha2QLsYaRU+Fjk5GY9YsCK Q4Ua5+l4nigHyzz5BT4MnKAMgbPWIN/UUTKPSjmlC8j0+Rz2t8HIgAt0kgv3WKSH6Obq 5L0Bf1X1l6n6rVI6BO2MLAvj4RW5+CbUQFjbTm7sHul9FqDfbdMliZBLGTCVCF3OA6l2 LkreKfN7N+ToEIxNYm7nKDD+Yoqmd3RZnxtmMYkk3dIjXnbXflc4llll5ErgIak4Wwqr GtBA== X-Gm-Message-State: AOAM532yJ/kUoRPB2/MS4t3ALeaW25YZjrMQ0ClbDabRt6ZUFQHBD2e7 SRK71l8iBZq7NZf6SRW/LRDocYbSG1elBA== X-Received: by 2002:a19:ae04:: with SMTP id f4mr3145769lfc.667.1644934607857; Tue, 15 Feb 2022 06:16:47 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:47 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 4/8] drm/msm/dpu: drop bus_scaling_client field Date: Tue, 15 Feb 2022 17:16:39 +0300 Message-Id: <20220215141643.3444941-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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 Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd --- 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 401e37f50d54..480d02ccff8c 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 Tue Feb 15 14:16:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542785 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp501842imn; Tue, 15 Feb 2022 06:16:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtA2v9sF/mlE/sQ6/zsyK8qi/HkC8TBUJ6hg6VbZLPhJ+VEI8AedykynVN5DrAqMqaBr4W X-Received: by 2002:a05:6a00:2349:: with SMTP id j9mr4644091pfj.34.1644934617137; Tue, 15 Feb 2022 06:16:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934617; cv=none; d=google.com; s=arc-20160816; b=R9chI1rke4XpM/cDeWG2CJZjXlakCOxzwhST8d7nIEZ05rSg58FJhNvAFNoAoWqqnu kvrrw2YLt6WujhLFrApY7jM9f7I5dcDiDVioz2H3XWFPlV3ifByM222O2DwWEFCH1OL8 hCcud23QMr0ynyniMSU7/Bgm2WyuvB2CC2/Psv5PFu6DmFTqR0Lx9fL6DPg+XyVmpaS4 esh8D4lmUpitwr/7Y+AS2q+onw/rwUPaf5LMi5v6peGZsif5LWoWRfLsiR7NhMEFnLDj JOaEdPgnDO0ZLxSU8rlMhr9b8X4kcP3F2akaje6inEWmtIVI7y/q8G+crGkB3o6h9OSt g/AQ== 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=zOWsFQ2NqdBKJaWz8vlkHE1lWZ3O8C4cPJw7Ctmru5A=; b=aNzzkBD6Uu9ZgbO1qUYg70VaK/F5Tie2yo7SLi8egaJEd3r8YZmb0tzPpt/pBr8wwB Y63/eGH1q7/QwPOVCsr9p7xzKsypcZ9tnYjGTWijZYBejdMvrlUAMYqiSPvVY2f9LaWx 27+gdyNTTjDm3St6GDGUBBUOpHH9PrHRELwDEqm6MKcJmsaKSy2SSGKu3Z+HBv9EvvyS T+DhMo2XJEPzbMwMUV8a728r+nwRTEI+sKZBFKVpS0IrS1Q7uepdleRfmnc5qZ7ba58d 4lMuZQLtANYnB+9AHm4sY4TgN6KHHj5DzQiccyBNGW5pfBgshzuzIc0WreGBbCxJ6c6V ZzdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ar3rW97B; 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 q11si33927772pfu.131.2022.02.15.06.16.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:57 -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=ar3rW97B; 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 159BA10E5F3; Tue, 15 Feb 2022 14:16:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D05610E5F4 for ; Tue, 15 Feb 2022 14:16:50 +0000 (UTC) Received: by mail-lf1-x132.google.com with SMTP id u6so37148406lfc.3 for ; Tue, 15 Feb 2022 06:16:50 -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=zOWsFQ2NqdBKJaWz8vlkHE1lWZ3O8C4cPJw7Ctmru5A=; b=ar3rW97Bd/FO3/TiXMLwcY5rUfU+ObqWzWidDP6RqiKwOimcHmEUimm0UfmtFkl+ZY L/BEn+OZGQJnYcnOKPgy21EZ6vD0lIst/8Syl3z7NrF8Vkwh4AoFKsqVPi4jPaiWj6EJ e5/i8Qrd7Z9zD6epSqcnAtQBBQDURdwHriUDYextSnl+RG5HsfWloX+hVWk/cIFFfEA6 qdBBi8D68pUh6KZ6QaGMiV9Rg/eIfqMEpB2+3Y1GLwWidsbsOaoCXAL5a7ZupVoKE5Ch FWqezFdsn7BthdHgOjTr47xeMKggMQA59gPGKU6PWLaKorvc7K7NqWL3D9+YDgOdcSFM ZJRg== 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=zOWsFQ2NqdBKJaWz8vlkHE1lWZ3O8C4cPJw7Ctmru5A=; b=y3bTBAt5BQpLEm10CCddaHksxlukzDzhT7v4ja1xpMyCnn0rAlKOprBH6+poJRMUN4 XQcEOWuKo8s6/paCVfM+ff6zoa39fSJrK+Kj7ZiDoJFxkHUlnXQ/oBOqHJSo7K5nw3xe Lh9M1nOor9KbkCrh6IgsOlL0Z4K6rtq3ZiMFq+0jyzTOKTnwcqdchip9R2MdvQ02AjJx aE3sjSF2rJltHU5RfnrRXWh0dalYuhHrDoBccmDXWvTrXa5zPBgMRfYUFh1/s4HcY0rm 8FeJ0I0/DDCtbzHFnX7a/L9jw9wbiJbqciXk629u0ZwWNoMIKg+HUXZYneDeySGQhCTl nWng== X-Gm-Message-State: AOAM5330Ht0kRfHC2nyjUqddoaHmtrKIdFaHvMcE8taw1+hLLC9I25cJ /zKkaaR4emXPGwDcfnNqjxp+Mg== X-Received: by 2002:a05:6512:1081:: with SMTP id j1mr3247583lfg.257.1644934608816; Tue, 15 Feb 2022 06:16:48 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:48 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 5/8] drm/msm/dpu: encoder: drop unused mode_fixup callback Date: Tue, 15 Feb 2022 17:16:40 +0300 Message-Id: <20220215141643.3444941-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd --- 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 480d02ccff8c..394916e8fe08 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 35071964d0f6..1796f83b47ae 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) { @@ -756,7 +747,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 Tue Feb 15 14:16:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542788 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp501940imn; Tue, 15 Feb 2022 06:17:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwopjyZwpsu5vsatIXhYUNzHp63IR5eZ4MVeEFV2/fiH30nvqrK08P/Lm+CbB8AuDMfe45s X-Received: by 2002:a17:90a:306:: with SMTP id 6mr4530506pje.169.1644934624097; Tue, 15 Feb 2022 06:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934624; cv=none; d=google.com; s=arc-20160816; b=j2aaGNf65rbTmWStDWqmQ5+3E+3MtX0gLI5/EQLkqlsRZQ9ij22IejWvZG+f/IiNVB 76q+yl+gzn6hTSTH4+DurzewfS9gy5AwalK1nQjZKfn6ZpJsqsp3bH71Zwn4t4RxCBsu jlUxgv+HY30QvtGTiTNg0thShHZl1Wa+K5Pp/4zLBQ+Trjh1aTQKANpU4yQ6vF3oYENC ydLTgc84cevwLAlnht/mJ4SL4n3/o9EVPTfqDYA5cCoOc+KaNGIni6xm1rbJYURdZrqb J/Uxujyq4Putok1QGeD2e0Jn5EI6d9k0bSUNoruvm6OrcBEV6hE5WQKlVFF17acBfBHB ln6g== 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=+6zzBZEPu7JIbU1EkOVsHrflhg0MFhCTZo4zFz5JwFI=; b=BEdWHWcmpL5bzuHmiK5o6vuq5AYaTByMoOvqDyY1hWaStQ7usK6B1iY/FS+JTNcTm5 t8ZKHBU2bn3AZ2I4aQD/cUAbsfkEFsIC/uAKzeB/JDJTBKZqzPC1ZrfjANu2sJXvMBux Sx2pi/uOAdF8L7QhrG52sIBwWO5v/ivAW6vHYXacwJt7J66cCcvzsbpdQY6Q8bb/wVIJ Ar5y/e2jEpYLnShPbq7CWOgY/hPLrwfkfXkGDiOE936a8XA8RPeQzv0nh8ep9rN/5ObV QX+6QM3GU9M1JkWeZnZE6QXxfx0opEghg0Cx51KTAeNkdlBDlQRDtwBD0iT0Q/LgjDrk g8WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HhMuvqf4; 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 l15si4716663pjf.2.2022.02.15.06.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:17:04 -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=HhMuvqf4; 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 B09E210E600; Tue, 15 Feb 2022 14:17:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6139310E5F4 for ; Tue, 15 Feb 2022 14:16:51 +0000 (UTC) Received: by mail-lj1-x22b.google.com with SMTP id bx31so26971750ljb.0 for ; Tue, 15 Feb 2022 06:16:51 -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=+6zzBZEPu7JIbU1EkOVsHrflhg0MFhCTZo4zFz5JwFI=; b=HhMuvqf4/Sb/mZWSrKGgWgYJg/nCuJLHQCNX2vm5xJGbP/2GSce+g+oblYxtQUlwpd VBMQYg9Hlqe0XJsvqHMbmIT2b34i1ERDtHonTxBo8kYgqzG2XYD0w+NoSRPYx9eifQF0 YWBZ61F4I6SW0LhtvPgJp5I5DVGUqjSEsV4rhXMiejqBnOLgMUOwh3dakEghWaAwRWMY tPZczlgcTJlDzBGojVS8RgeP2OEHyfqkFr2hff/tpChIIDw2gpnCkePCS/wmEe4vKx1S I/fw43ViHOEclt46wr6DIzjEqK7ASXplRC9oDALqeYgnBREuIurWR17UbHKHikGPBjD9 Ym4w== 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=+6zzBZEPu7JIbU1EkOVsHrflhg0MFhCTZo4zFz5JwFI=; b=Hz4mcFFOgbIjjc0svnBmWXy4G9uAneEGpIa6gY5r8YvOng9I4I6CeYtfTNJgwSuZJQ F6H0HeORPsFLnMYf0FL8IEA7MPEfhgkizWiVWME9XPoyAZwnjHXDe94n/nwc17LzlkU6 awoURi3KJumRhYRpyDgEQNMGls9hit+DIhRP1c2Azr7WRzMvmubSArAcfX47yxk7OOc+ CDhulAosYY1Vljtws78nvMkmZSLph6nLKe7kCE0EPE+JYX0Hnr/UbjIiLGc6ihk3Hp0C ZchIYjJmxv/D6fFhV/y0SOCmPf9IkiCbG5Mo91zV1QggKT2n3HYGQV1LId5gFDt1kZVz 1Izg== X-Gm-Message-State: AOAM530xtqcDsc98pP6TUAVwlZ3aquHf+mLq0jndQjJ5zLRKf6JPyjoQ r4TDgy1MQ5hK4TdJwuqa+9eEGA== X-Received: by 2002:a2e:955:: with SMTP id 82mr2838402ljj.105.1644934609669; Tue, 15 Feb 2022 06:16:49 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:49 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 6/8] drm/msm/dpu: switch dpu_encoder to use atomic_mode_set Date: Tue, 15 Feb 2022 17:16:41 +0300 Message-Id: <20220215141643.3444941-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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 Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd --- 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 394916e8fe08..ae60d415c66d 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); } } @@ -2079,7 +2060,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 1796f83b47ae..f66fd31993e3 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 @@ -142,23 +142,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; @@ -746,7 +736,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 Tue Feb 15 14:16:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542786 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp501868imn; Tue, 15 Feb 2022 06:16:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJy57ZIwB5ZkfjfpzIlvSYNLMQBRJMGlw/GEIVKXEZz1+nXy1+xCbyse4ipJlHQPQyffOnkU X-Received: by 2002:a17:902:ea0b:: with SMTP id s11mr4325302plg.127.1644934619759; Tue, 15 Feb 2022 06:16:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934619; cv=none; d=google.com; s=arc-20160816; b=0ayZBVDq8kF/uiz32F0TU0PP0MVnvRBBzHUGefKcqyL1oCH+Yq0DGHZlT9v/AKAdOI FlVllQwAVgSW0C3vfEOwyFRzdPHdLKOSpmbyt4yGWx3IYHJ64eZOwANE7IGUxiChps2J uoZdYJox7bNS9Zv+OKXyHENp8OCpYbb7N5FoQO24vc0mRlWHFXfyHFNhG7MwqEPwy9jR mDaunGntMD6kprkzVdUBBFTy8z5rmSPw/e6cWNUITAcQx+IcB7UYSOEllnc8CQZaL3iX TuwlYNmqAzKZg9dEUrG1kOvYHti5Q2Bh1NkS+a6CcnwJXHjTBklgPY/CWDJfItrBpdIB dfgw== 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=sP5TaMCcyJcd5zxUV6bIRYDzEaL3RGEZ1yr0y21buG4=; b=cQQD+hsOjCeTl5T8VBBUWshPBSB8TTAPXjz3GxnTSvBNA43Bok7zQqpYfE0d5N76LI 35bq9NPQxd223+xyLSGmWscEPytjfYCwdoprp7Hx2YpSdguCqyMyHcUArHQtWP/1S9iv n0frh/iq9HaoAzXWMwUHQQbcv9RKFaBIkQkETk50mg17lE/FtYs39n9k4hQ6ZZMj/DD+ +Mzic2appgqpzUltyxSY9yFeBDFjtnaamvw7zLyj/he2uf+c25bzhRbFo7PRMqJUYg4k XQ2eoffvAu15SkLrNOGvVwkJXVkxA3J4Hbm9nnisIie14dzfcKwN0nnsQt5ohCJtTVZK E50w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yOZCX02H; 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 s14si9950669plg.620.2022.02.15.06.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:59 -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=yOZCX02H; 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 E246910E56D; Tue, 15 Feb 2022 14:16:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A8F610E5F7 for ; Tue, 15 Feb 2022 14:16:52 +0000 (UTC) Received: by mail-lf1-x129.google.com with SMTP id bu29so31923185lfb.0 for ; Tue, 15 Feb 2022 06:16:52 -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=sP5TaMCcyJcd5zxUV6bIRYDzEaL3RGEZ1yr0y21buG4=; b=yOZCX02Hl4o9MArW/UwfxuLgByfWvWqghgfUBbiTbAiYf4VyEQg15JsuvJ0UYGfg5D 3Y3nWBpC1KNSHC3Q/1qgIKHgZt5GIsQUrTElbseeb5/xA5mpPdQqSQ46TkUIfuWNyEEK w3eDaeyu78DsiUWsZqF1Xste5YMWhxd3WRbjG0QkmD8aLYfOhDh3bEjosIZ4rU3x2/CT 54g/xB8Er9rBN4sbsrmPQRgr2kYyTbtA/7hu55i6sJVJ82X7vlIRIr6unwqSRw2njnJ8 vPk5ERZU2xtwXNkeqG6TCzno8WdH+PDw2F2buLm9SaOYnXwI5mLhXz16f50+LRJTPd/i y94g== 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=sP5TaMCcyJcd5zxUV6bIRYDzEaL3RGEZ1yr0y21buG4=; b=XtfBeedUqRy3tEdOHk7VcjExRgE/bWzHIxgU2bWbKtj6FqG2smzAD2PO8FmRoq/ahX JuHfyW+6c9zu++Xk8RM+yMr04jVq7A8JFEuYxSRJzlrL9naNTz1Ciudj1eYl9WzmY5jK h0MwmbpGbYhLzaVZPvhhuGT032t4nvvyy8vKCApwK4WwD54yZRF+P7kqbWdasj56ki1l oqNzj0ENo6O3vrWggeIKUXo+m5S9Pdyi4oJlIYwG4dkj+0SY6NQ0R8B34SUZDPVo+NDH rj+JN0eYV9Lr8g0tPw/qMdGeUhvT7bFIECqoLhsuBZAXnvu/u3cH74Jdi8ZGPXCpMdHa ep7w== X-Gm-Message-State: AOAM5314Eq7b5QU2r5WulqjvTPEjntIvPaTcql9I428neVimWgV7Ydj2 9genzfoPZju+o3iY6MwSVUTtnH0Np2DiKA== X-Received: by 2002:a05:6512:3b9e:: with SMTP id g30mr2729917lfv.306.1644934610647; Tue, 15 Feb 2022 06:16:50 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:50 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 7/8] drm/msm/dpu: pull connector from dpu_encoder_phys to dpu_encoder_virt Date: Tue, 15 Feb 2022 17:16:42 +0300 Message-Id: <20220215141643.3444941-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd --- 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 ae60d415c66d..fa1dc088a672 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; @@ -1180,9 +1183,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; From patchwork Tue Feb 15 14:16:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542787 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp501899imn; Tue, 15 Feb 2022 06:17:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJztrhp1h/QzUBqmMNk7sKP83UlToyy+iMCvCBRobCrkShJY5KC81TWz7M/WN88KnqSQAAdE X-Received: by 2002:a62:ea14:: with SMTP id t20mr4588369pfh.39.1644934621861; Tue, 15 Feb 2022 06:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934621; cv=none; d=google.com; s=arc-20160816; b=ugnpU2LE4NmM2oCJdSkYH5SLuBRkuTQ12/FBxdiFU6X/80K/NJdI5XviRXbJXniBd2 /4Wb72NJqDAaqlPqyx1MGdL1deaDNB0tZioms1UI/pA4CAWCnvzknSAhcr9020ucIfy8 HFaEempFCRHZgY1fN1NjBulVOBNMN61twu9B4v4KP7RwUlEQFNdfJRDP8vHfsneJaesY zQnRCvWECgoxEABsQwPs60qVXmYa+36fBc+aTKuZoPZPMXHlPtv2JcWzuWdCoIsRfMQS wcC9KhbPoOKC61wVGBn37UP5AR3FLuB5iIJkn1gh+XhPFA8UVeaMIQJV0S1OK58rmsRy f8Sg== 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=gtiG9f3vBEbA3zEJOCrF6gFQgRVBwFpMr8tPeKm1boQ=; b=WlybqcOinzKepzsclq2Cg3M46mPXr7o5QMZQzO7Ow77jPEN5nxTzcPKTOiNk70I6kb 3Aj4yuX19bMxOumUBryUKnNVLcPHKvGVX9XwPPpk4an6/dHUSGNcN2yuJSlV1czCYZ+5 U4xC/f/MZJqdxKcnlg5oD6SneLjWbhxMoAbMvVLWAeOr3jyz4BFms/fRnAemBmqbdbuR UYRqA6/ScsJwsA1DDZ/B/d3aM/KqoqHvuG6Yb+R5bM+HhN9I67a6EO5U4xpC1t+HO4FM U2Sg0b4D17R6wbWhkqLfhHgrT9j5eAYV1Let2yrFRRHK56Hyef03FIr8cZIQf4ItSjF0 IYAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TPcdFDUT; 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 bj11si2658775pgb.272.2022.02.15.06.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:17:01 -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=TPcdFDUT; 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 595C510E5FA; Tue, 15 Feb 2022 14:16:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 44B5710E5F8 for ; Tue, 15 Feb 2022 14:16:53 +0000 (UTC) Received: by mail-lf1-x12c.google.com with SMTP id b11so12443738lfb.12 for ; Tue, 15 Feb 2022 06:16:53 -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=gtiG9f3vBEbA3zEJOCrF6gFQgRVBwFpMr8tPeKm1boQ=; b=TPcdFDUTwesaeJUPV1oYjukpccN5/s5hjYmWgbT/b11HKIw1OLQP10PbBLwglaWm91 vjaH64G9u457OyP081Hu8GcSpTaYDxwdSwAYVss27WAOpOMQ/kO8h+gxJECwFxcI4AHp Cv2pqkPHID8lvwmyTdg1tfkClYmP/9NePpU4iyYc9G5bgkmtEitogV1Kqsyl0LDdo9Pk zEhhToWJ9ufjNEwTRjO9l9zb8QSOgNaOAN/3N+KWq0VUjnJtgU++0++yRqJbCAcSLfAA X+gA0/4FQQKuqPyRpFvLdD+rbilRRwbC2wTxpX7rmiAgj29YKlfNV0Y2dcQDRtZBFed1 G97g== 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=gtiG9f3vBEbA3zEJOCrF6gFQgRVBwFpMr8tPeKm1boQ=; b=GjOOO551axQ+mianjv/krXGlLy69FOYf1ncibw2LL0vcyp9mSblFJ+KzGOwtPOwIPi ocRWcXwNRO9cM5BN67aqHVycJ774tN3PtrqhBo0HGrwqpWETV5hD3dTGQ6yDU77vPKFM wuZLnFzFinHFqOnHH1idfeD6AGZiZIMzsOnz+18P+RCc48iWfSe8kVcXgmYw9Udf8onx AHud+eP7U/181UI/93t98gUVp1SU5mjGwbi74tzhqUYs/yDISxTW+PeKQlII9jn4nPY9 VagzY++g8EZng0Gc3QIIZnHLQ7u1nBrQo6nnmWEltSPfWivv1PKw89I/Zfjh0wlMxFta wI5Q== X-Gm-Message-State: AOAM531fEgwxflgEsESNpLpSOhaX6O3Q4UceCcybTYYrfzTKrL9J9c/F u0FSx/xkMqWYhvpBs4YbJNYdXQ== X-Received: by 2002:a05:6512:168f:: with SMTP id bu15mr3318714lfb.634.1644934611563; Tue, 15 Feb 2022 06:16:51 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:50 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 8/8] drm/msm/dpu: simplify intf allocation code Date: Tue, 15 Feb 2022 17:16:43 +0300 Message-Id: <20220215141643.3444941-9-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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" Rather than passing DRM_MODE_ENCODER_* and letting dpu_encoder to guess, which intf type we mean, pass INTF_DSI/INTF_DP directly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 26 +++++++-------------- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 5 ++-- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index fa1dc088a672..597d40f78d38 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -490,7 +490,7 @@ void dpu_encoder_helper_split_config( hw_mdptop = phys_enc->hw_mdptop; disp_info = &dpu_enc->disp_info; - if (disp_info->intf_type != DRM_MODE_ENCODER_DSI) + if (disp_info->intf_type != INTF_DSI) return; /** @@ -552,7 +552,7 @@ static struct msm_display_topology dpu_encoder_get_topology( else topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1; - if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI) { + if (dpu_enc->disp_info.intf_type == INTF_DSI) { if (dpu_kms->catalog->dspp && (dpu_kms->catalog->dspp_count >= topology.num_lm)) topology.num_dspp = topology.num_lm; @@ -1074,7 +1074,7 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc) } - if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_TMDS && + if (dpu_enc->disp_info.intf_type == INTF_DP && 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( @@ -1082,7 +1082,7 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc) _dpu_encoder_update_vsync_source(dpu_enc, &dpu_enc->disp_info); - if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI && + if (dpu_enc->disp_info.intf_type == INTF_DSI && !WARN_ON(dpu_enc->num_phys_encs == 0)) { unsigned bpc = dpu_enc->connector->display_info.bpc; for (i = 0; i < MAX_CHANNELS_PER_ENC; i++) { @@ -1949,7 +1949,6 @@ static int dpu_encoder_setup_display(struct dpu_encoder_virt *dpu_enc, { int ret = 0; int i = 0; - enum dpu_intf_type intf_type = INTF_NONE; struct dpu_enc_phys_init_params phys_params; if (!dpu_enc) { @@ -1965,15 +1964,6 @@ static int dpu_encoder_setup_display(struct dpu_encoder_virt *dpu_enc, phys_params.parent_ops = &dpu_encoder_parent_ops; phys_params.enc_spinlock = &dpu_enc->enc_spinlock; - switch (disp_info->intf_type) { - case DRM_MODE_ENCODER_DSI: - intf_type = INTF_DSI; - break; - case DRM_MODE_ENCODER_TMDS: - intf_type = INTF_DP; - break; - } - WARN_ON(disp_info->num_of_h_tiles < 1); DPU_DEBUG("dsi_info->num_of_h_tiles %d\n", disp_info->num_of_h_tiles); @@ -2005,11 +1995,11 @@ static int dpu_encoder_setup_display(struct dpu_encoder_virt *dpu_enc, i, controller_id, phys_params.split_role); phys_params.intf_idx = dpu_encoder_get_intf(dpu_kms->catalog, - intf_type, - controller_id); + disp_info->intf_type, + controller_id); if (phys_params.intf_idx == INTF_MAX) { DPU_ERROR_ENC(dpu_enc, "could not get intf: type %d, id %d\n", - intf_type, controller_id); + disp_info->intf_type, controller_id); ret = -EINVAL; } @@ -2092,7 +2082,7 @@ int dpu_encoder_setup(struct drm_device *dev, struct drm_encoder *enc, timer_setup(&dpu_enc->frame_done_timer, dpu_encoder_frame_done_timeout, 0); - if (disp_info->intf_type == DRM_MODE_ENCODER_DSI) + if (disp_info->intf_type == INTF_DSI) timer_setup(&dpu_enc->vsync_event_timer, dpu_encoder_vsync_event_handler, 0); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h index ebe3944355bb..3891bcbbe5a4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h @@ -36,7 +36,7 @@ void dpu_encoder_get_hw_resources(struct drm_encoder *encoder, /** * struct msm_display_info - defines display properties - * @intf_type: DRM_MODE_ENCODER_ type + * @intf_type: INTF_ 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 @@ -45,7 +45,7 @@ void dpu_encoder_get_hw_resources(struct drm_encoder *encoder, * used instead of panel TE in cmd mode panels */ struct msm_display_info { - int intf_type; + enum dpu_intf_type intf_type; uint32_t capabilities; uint32_t num_of_h_tiles; uint32_t h_tile_instance[MAX_H_TILES_PER_DISPLAY]; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 5f0dc44119c9..bca4f05a5782 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -564,7 +564,7 @@ static int _dpu_kms_initialize_dsi(struct drm_device *dev, priv->encoders[priv->num_encoders++] = encoder; memset(&info, 0, sizeof(info)); - info.intf_type = encoder->encoder_type; + info.intf_type = INTF_DSI; rc = msm_dsi_modeset_init(priv->dsi[i], dev, encoder); if (rc) { @@ -630,7 +630,8 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev, info.num_of_h_tiles = 1; info.h_tile_instance[0] = i; info.capabilities = MSM_DISPLAY_CAP_VID_MODE; - info.intf_type = encoder->encoder_type; + /* FIXME: HW catalog treats both DP and eDP interfaces as INTF_DP */ + info.intf_type = INTF_DP; rc = dpu_encoder_setup(dev, encoder, &info); if (rc) { DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n",