From patchwork Thu Jan 23 12:43:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 859451 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29CFB20F07C for ; Thu, 23 Jan 2025 12:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737636303; cv=none; b=blpTNu4V2uyYzAigxg52LAK1W8BmGjLGP18ybxkPJIBoWMrgVwXiGNbjVCkwWTQVWbzrDFUoKd8EJv/N5GZkqdTp4b2ioNkOofHbQM/+YgiVe4FxT8GZHb3qzLvsXKzAJG4j8tao11g+tkRiI8q8W3kEjsgNmOUA6Bgp3zlnbz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737636303; c=relaxed/simple; bh=6FHiK9uSt3de2pV2Wxfa/Fv4p/tQ6hl+nIDAnUNBki8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NV52OGZA3o2kQNlxZRNKr5lHFgQkbEAvp4LM4bIV5vFjukgxUY/SC7Rht/QmnhB27qs2TqoZw6zB4ui9I6GwkIpHl/4OkzgRggRZsAZjh9JqYa24wdQR4aTBQJ1Au1GByfvpp18+Eb86bgjUjx0ONLxSLMIKMQnDq49awlLwG9Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=WHVxIlhQ; arc=none smtp.client-ip=209.85.208.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WHVxIlhQ" Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-30229d5b21cso7824111fa.1 for ; Thu, 23 Jan 2025 04:45:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737636299; x=1738241099; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zWl/mrUuu5iSDDnMWnDf6mIxagIYPOHoQVKnYJ6xmpc=; b=WHVxIlhQ3JalS9LY36KZseOgmYa7vhDCLx+AKGWG5yphHW/MQuZn7mIV4hNmu5sXVj YnNpF1G6U/cT5nnnVr82OmWWI3nmHZGP2y/FA/vt0dUk0hnN2QlsrBneVw5biCrHF9nw pxF2nxWiP4T2w9fJKEFa3TfJ4Ziyzbjz2LuFYtHE071Xd/NHqJoBkozhfYna9EFcj6y9 eB898egghIodHWls2uUbfl6+W4Z/idydt/nrNhLzdn9csWNDWWIdbvRH80+DBNaNUeR+ ru2MEIDiNK8kT+v5a/XyIsnWSFx6VT+Wh10zJMBaw9EqlYUkpPdxiXx1+oK/cyIh7a28 pO0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737636299; x=1738241099; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zWl/mrUuu5iSDDnMWnDf6mIxagIYPOHoQVKnYJ6xmpc=; b=oVJOKWZicApqNwzLji8sW/RLoaVoI0C2X/P06LLdCc1gpsHVWcRBH/zIxrTqYxES79 JBP8CF9GZ0pGrsDFXtTqOz/btgA/cDvURl5HmhOv9Ijz1coixaD8Za7yaQNH3fZT7PMU vOf3RSbmPlpPTgrLeZe7X9K5c1L6WntXR9DEmYZWiWtk6cbif4xkcH0p1p6E/zCKmmS0 1yaq5nQhuUypGB66bzA3XsZCxRRUSUT2tgUqlhoNyW0vt2TMTN4WIo219NsBUUtnm8I+ AfYugU4rx76YIdjxhmZGOgsMPUKG/JTO6cDCqn6HuJqCBsLCB/iYGue5cS3lqFO4dgEy T70A== X-Forwarded-Encrypted: i=1; AJvYcCV/flbi1ovpUjBu7z53CV6TPqJImcvp4lIHdjHBfofN6AwqTfecr2i6ftQvycN9gIym3vuckqGJsJqe+xKu@vger.kernel.org X-Gm-Message-State: AOJu0YwNzzaeN+/lrLJlwgZCBlGt36nakDdsjAbmCKX/HQ2rNXJKfs4G GqCO8QgaWyJk8A2pXs7qBrJv/PMvxro8OGPG8b22m9YbbastqsVHjg5cgHWYl9A= X-Gm-Gg: ASbGncte6Jpy1enSvzDo3QrdEJtHzA1p5Yrn7RxLnZm3cTPe9EkSeUVJ/uNobupL76s k84QDuO8QvqWkindRJsnHM2kpAOxPKYYfn5lkPoENyk+oe2N3ySyvT9lzT682YrpXddOoVNC1Z2 sYelRBqs85VqQUom+/L8lInoN5xs/SIvProBg+qB+jEtP6tktvLy68TA4WGqwQbpJWNnFpNDYEy uR/OhghLhuoP8goctQVy8FlUCEKg0Hq+GOYQS8fTLw3vzlKFamuy/lEu7cdGnTd47NIxD/4EPag YeyZQu/wJt+K X-Google-Smtp-Source: AGHT+IH5IcSIZSra8LNFX06NTWLQF49L8vuXLlXRQh+G8XpZMvxMtaLUd8nrGDGk8rwkOVFCuslUyw== X-Received: by 2002:a05:651c:b0a:b0:300:31db:a77c with SMTP id 38308e7fff4ca-3072cb66636mr95637551fa.29.1737636299239; Thu, 23 Jan 2025 04:44:59 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3072a4ed6f3sm30351661fa.86.2025.01.23.04.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 04:44:57 -0800 (PST) From: Dmitry Baryshkov Date: Thu, 23 Jan 2025 14:43:33 +0200 Subject: [PATCH v2 1/4] drm/msm/dpu: don't use active in atomic_check() Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250123-drm-dirty-modeset-v2-1-bbfd3a6cd1a4@linaro.org> References: <20250123-drm-dirty-modeset-v2-0-bbfd3a6cd1a4@linaro.org> In-Reply-To: <20250123-drm-dirty-modeset-v2-0-bbfd3a6cd1a4@linaro.org> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , Chandan Uddaraju , Jeykumar Sankaran , Jordan Crouse , Sravanthi Kollukuduru Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Archit Taneja , Rajesh Yadav , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Simona Vetter X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2323; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=6FHiK9uSt3de2pV2Wxfa/Fv4p/tQ6hl+nIDAnUNBki8=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnkjnGZW1iNAEucAxcOXqyOyw158iAcmY8raCT8 0H4hgMFpe2JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ5I5xgAKCRCLPIo+Aiko 1brHB/93op8onAUXr5fU2A91buXHuSnIU4NV07hLC1vcebijvhJa1lT5ijFMMW5lkFVva1FJraK lTMyHGLBKOQVPBInM0u4bJPw23lqTdKT29bvGzjNNqkVjTrQFlQ3jlqGWBVqkqbLC8tEdP0oZlz eHJtnIddkK/uiP/gugYSZysBeHZMaXbYGczZg6LzXAE6ZIOiwVw8f5eIPLnYExHgLSw+qrHo4fd vo57FzUtE7M2eEEtJzTKaiDKfDVuEuLVjPA7ANYeNi7eUmY6tkvVo60tBnB2VvHPLlmGcewJG4M gg6BZn4vxqTEFxE3zWgCnOtwraczzavKlUDfWCb/XymzDNhL X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The driver isn't supposed to consult crtc_state->active/active_check for resource allocation. Instead all resources should be allocated if crtc_state->enabled is set. Stop consulting active / active_changed in order to determine whether the hardware resources should be (re)allocated. Fixes: ccc862b957c6 ("drm/msm/dpu: Fix reservation failures in modeset") Reported-by: Simona Vetter Closes: https://lore.kernel.org/dri-devel/ZtW_S0j5AEr4g0QW@phenom.ffwll.local/ Reviewed-by: Simona Vetter Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 4 ---- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 7191b1a6d41b3a96f956d199398f12b2923e8c82..65e33eba61726929b740831c95330756b2817e28 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -1264,10 +1264,6 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc, DRM_DEBUG_ATOMIC("%s: check\n", dpu_crtc->name); - /* force a full mode set if active state changed */ - if (crtc_state->active_changed) - crtc_state->mode_changed = true; - if (cstate->num_mixers) { rc = _dpu_crtc_check_and_setup_lm_bounds(crtc, crtc_state); if (rc) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 5172ab4dea995a154cd88d05c3842d7425fc34ce..9aacd3b5bcf808c5712bf797a48484e297386c1c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -793,12 +793,11 @@ static int dpu_encoder_virt_atomic_check( crtc_state->mode_changed = true; /* * Release and Allocate resources on every modeset - * Dont allocate when active is false. */ if (drm_atomic_crtc_needs_modeset(crtc_state)) { dpu_rm_release(global_state, drm_enc); - if (!crtc_state->active_changed || crtc_state->enable) + if (crtc_state->enable) ret = dpu_rm_reserve(&dpu_kms->rm, global_state, drm_enc, crtc_state, &topology); if (!ret) From patchwork Thu Jan 23 12:43:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 859450 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5043520F99D for ; Thu, 23 Jan 2025 12:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737636306; cv=none; b=mHW6QCzuj8d9BgqbMzs4ZM0qnVsHY9eqiRp8nesT9NQWhExbkgR8eWGVLOhb2tWNTcxxJ8bXvdgcuPwsAwEjVQqj1E8Lm9N+T8uwrDhVv5c+b+uD/bG81ffBoppG9fT60X/+j6nIjTaoTsEKSi2wH3m1ylEPjiGZgmaxRsnCByc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737636306; c=relaxed/simple; bh=pI8jt/Gg0nWGsVNN0M+A+HMbfSuoINnuOGtnWy2LNDQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LDRGN/vU9Kcld/s1a1DqHNY1yiimZWVooim2GBWpjmSJMwGCSKp8MhGX7t4QDKKGkdt96mf0QElq2gKFY1X/cMUnTqEQzcI1435mQR6Sc6PtNuR8pfkd/+RQSqvF7w1wKmqTJ1ok4UCaO9TNZxSok69G3pvFuosC0wiet8kJhl0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=U+i/gNLi; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="U+i/gNLi" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-304e4562516so8713311fa.1 for ; Thu, 23 Jan 2025 04:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737636302; x=1738241102; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=4vF0qbcrlUHMns+leDnByN9gAa2CtmYb+mw9y9wF8iU=; b=U+i/gNLi2prK3vWcirDSfvdTlbzx5d49ri3NXc/I45csnOUy30MP0beoYb8UOitEWj OS0mawaMkqy4Oy2I/1MzAFxB8lhMu41txL8LHYL+HrgmRSn0X5l8+6eIQp7A160vebyL OSVnRG3EA55SRJACpfKbYSLZNcPJsDXGhpjsQDrulB2PoE5iP3Kwy6oMKbe8s7w98Of8 jv9HMsQFRIYPw1BMQC+qn8tsMby+PW2r4G/ktg2qS2mCOzsFVNssir8kfZyLY8099y3G qCW6SeZg1FnuHVQ1ICQ3Yd3IYLwzqGCGJiHPZ4h9amhWk0Q1aJdZDMiwHUU2GUAuSrs/ QFxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737636302; x=1738241102; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4vF0qbcrlUHMns+leDnByN9gAa2CtmYb+mw9y9wF8iU=; b=JeMS1aSwY4BTd9Xau3FaisSQa3cPODuLbTLaJte1BHj7WSkVe+AsOZ33Aw5ctmKrXZ c1Dp6X2fnhWrzOANEN9D7whz7cVUR+m0fyMLLTaiW/cWPs48+z/PqrHnk2C3MuwhIBUs 3Ld+GgQ2SOZtGxAYuSCb0MOwBXsqI9GwvzrHzvnvUfomOUkpBGrE390IRK0+vNsjQlNA CSp+xY+xWo0h/Gfi3NwvSClEr/HrJJXYRdJTJYlxV83RmNlPAGjQaJ+VoLqCwWb/oK7d HNbpY3pDaii4fwg37F4TMKsJK1EP9IRkhHxQDOCnof/wPuxEZRnGmjkPCEVWnriBLn4/ ysAQ== X-Forwarded-Encrypted: i=1; AJvYcCVhLSw4ySK7U1U5VShuJVpi1dtmMOG8oEblR7vPQpLh43ddeMWFuaxEizRKGtaxeVhjwfCfgGUAYvcr2+bK@vger.kernel.org X-Gm-Message-State: AOJu0Ywrx70Zx1q+26RwZOjBuLxN9yMVkPIslDfnr9R6X1+4Ql9cyA1m jyi8FOjLJ3TzFiczVs/3nwMHTs3W0YfncMKzPL8c4Kr5n0nsqAJl8xk/mHD8/pU= X-Gm-Gg: ASbGncvC/GwAssXz4CVUAJK9WgaxTUstlvJzEU7vB3j9De7oiMwQJ3K+gUhFQ1iYi7+ qlGQuxsFWE7Zpn5yqe6CggMGx7IWF3N1BKKyrbSzbyKJaZo7SxYk8J+V5hW2n/TZdqakqLHKjGC KB4a/iFE4vNFOirXaEO9UVLYU6XXwaGJq1WfjMgK5gKw0cs/O9l8Wd4n2Aj8BeAe1Ls3E3iPIb5 hMwhLSj9QUk71gfKG2tDmW5C62suJVnDWyqJUltAtH3iVn6MLu3qFLNnngn/zRPc3TTVNMJMZdA k86WmtwEOqlz X-Google-Smtp-Source: AGHT+IHfHG9O5X1llYskqSd6JQCpl9Yb2Ept1YS83FF6LDGIK5pJeawqROTCwXIQP6rC+URwkRuOjA== X-Received: by 2002:a2e:b5cf:0:b0:302:2cb3:bb1d with SMTP id 38308e7fff4ca-30761bdd3d7mr7826681fa.12.1737636302270; Thu, 23 Jan 2025 04:45:02 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3072a4ed6f3sm30351661fa.86.2025.01.23.04.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 04:45:01 -0800 (PST) From: Dmitry Baryshkov Date: Thu, 23 Jan 2025 14:43:35 +0200 Subject: [PATCH v2 3/4] drm/msm/dpu: simplify dpu_encoder_get_topology() interface Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250123-drm-dirty-modeset-v2-3-bbfd3a6cd1a4@linaro.org> References: <20250123-drm-dirty-modeset-v2-0-bbfd3a6cd1a4@linaro.org> In-Reply-To: <20250123-drm-dirty-modeset-v2-0-bbfd3a6cd1a4@linaro.org> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , Chandan Uddaraju , Jeykumar Sankaran , Jordan Crouse , Sravanthi Kollukuduru Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Archit Taneja , Rajesh Yadav , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Simona Vetter X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2264; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=pI8jt/Gg0nWGsVNN0M+A+HMbfSuoINnuOGtnWy2LNDQ=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ/oky2MKZhXySS3cvArifmwRFeu084Kz/31hv6VsytTww jkjfXEnozELAyMXg6yYIotPQcvUmE3JYR92TK2HGcTKBDKFgYtTACaitZX9f7HD3ws+xzjNY22N L/2XVW3Qnc5ftXqB6Y61F6cfenfkp+6fdv9fzgsjdZ/Gpa5L6X7gyDllw+PNRy9e4i25tP1rcau oeu7VAN0fFXuK1RL4c6+rB0Ut2av29odicvKh8q7Jk9X+a3X2CvqFlBV2rJ5ld9hdf+apqhbpgJ /b3tv2C909rRE84WR1gtlXmwVJt/13F3W2fXg27/bXA5t7+qVEfydxhNmLFgaFSB7s8bsvLP43Z Zdon1GkdFT5C7lNzBnCj/zOzc843OjA5xzamXI/PjxvDn/S2pdL/PwncB/q+hYqVPBhacjkd5pc q05ERP5d+XfPlZmBujxzvne8WNb2V3pRaRrLNW+l7Q1VAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A As a preparation for calling dpu_encoder_get_topology() from different code paths, simplify its calling interface, obtaining some data pointers internally instead passing them via arguments. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 5dc2e0585de1337601a0426795d2c8f2806ccd10..fe139c49823674adf980db5faa3f2acd4c9c20dd 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -649,14 +649,14 @@ struct drm_dsc_config *dpu_encoder_get_dsc_config(struct drm_encoder *drm_enc) static struct msm_display_topology dpu_encoder_get_topology( struct dpu_encoder_virt *dpu_enc, - struct dpu_kms *dpu_kms, struct drm_display_mode *mode, struct drm_crtc_state *crtc_state, - struct drm_connector_state *conn_state, - struct drm_dsc_config *dsc) + struct drm_connector_state *conn_state) { struct msm_drm_private *priv = dpu_enc->base.dev->dev_private; struct msm_display_info *disp_info = &dpu_enc->disp_info; + struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms); + struct drm_dsc_config *dsc = dpu_encoder_get_dsc_config(&dpu_enc->base); struct msm_display_topology topology = {0}; int i, intf_count = 0; @@ -764,7 +764,6 @@ static int dpu_encoder_virt_atomic_check( struct drm_display_mode *adj_mode; struct msm_display_topology topology; struct dpu_global_state *global_state; - struct drm_dsc_config *dsc; int ret = 0; if (!drm_enc || !crtc_state || !conn_state) { @@ -785,10 +784,7 @@ static int dpu_encoder_virt_atomic_check( trace_dpu_enc_atomic_check(DRMID(drm_enc)); - dsc = dpu_encoder_get_dsc_config(drm_enc); - - topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode, crtc_state, conn_state, - dsc); + topology = dpu_encoder_get_topology(dpu_enc, adj_mode, crtc_state, conn_state); if (topology.needs_cdm && !dpu_enc->cur_master->hw_cdm) crtc_state->mode_changed = true;