[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240830034103.121722-1-wangwensheng4@huawei.com>
Date: Fri, 30 Aug 2024 11:41:03 +0800
From: Wang Wensheng <wangwensheng4@...wei.com>
To: <harry.wentland@....com>, <sunpeng.li@....com>,
<Rodrigo.Siqueira@....com>, <alexander.deucher@....com>,
<christian.koenig@....com>, <Xinhui.Pan@....com>, <airlied@...il.com>,
<daniel@...ll.ch>, <wayne.lin@....com>, <alex.hung@....com>,
<roman.li@....com>, <mwen@...lia.com>, <alvin.lee2@....com>,
<danny.wang@....com>, <dillon.varone@....com>,
<amd-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>
CC: <xuqiang36@...wei.com>
Subject: [PATCH -next] drm/amd/display: Delete redundant null check for 'steam' and 'plane'
Since commit 15c2990e0f01 ("drm/amd/display: Add null checks for
'stream' and 'plane' before dereferencing"), the
dcn30_apply_idle_power_optimizations() function would return
if these veriables would be null. So no need to check again before
using them.
Signed-off-by: Wang Wensheng <wangwensheng4@...wei.com>
---
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
index eaeeade31ed7..ffc35a5653fd 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
@@ -925,11 +925,9 @@ bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable)
if (!stream || !plane)
return false;
- if (stream && plane) {
- cursor_cache_enable = stream->cursor_position.enable &&
- plane->address.grph.cursor_cache_addr.quad_part;
- cursor_attr = stream->cursor_attributes;
- }
+ cursor_cache_enable = stream->cursor_position.enable &&
+ plane->address.grph.cursor_cache_addr.quad_part;
+ cursor_attr = stream->cursor_attributes;
/*
* Second, check MALL eligibility
--
2.17.1
Powered by blists - more mailing lists