From nobody Tue Dec 2 00:05:06 2025 Received: from mail.0la.ch (mail.0la.ch [78.47.82.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA90423EA81 for ; Wed, 26 Nov 2025 06:52:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.47.82.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764139940; cv=none; b=C7ymTuk42RBz9C+WkD5K0dmJvuOTS7bnUC3RtHH/Ft5RGj++mH+d4ateesTKq9RsGMkeTGxEyjkyVYSVcvqGnopRc/b07BwPCY2K+i5Hvo8mp51j+3syWloSN0crg4Es9FoJp+99lT8y6Lf61u0+2zdtdeioUypBc7dZKEq23Ho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764139940; c=relaxed/simple; bh=JWWSnSEw8EvlR881rgFPO4eJCsGEdz9Mw2l8vrOzV60=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=akzyjK1Vs/99hYgQnGDP32cJDFFMgErRjpJPWiLBuPChGm0fq6XO/V1dH31B86kicJWCDXhjlP8neCn3veWUTrxd9/li4JITvJYx70bY0JSISCAOccpaiv3Z+yGltdvHtNE/YRFBS9LdoFTG/9g1TcvV7WqBH55+9Y76MbdmumA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=lach.pw; spf=pass smtp.mailfrom=lach.pw; dkim=pass (2048-bit key) header.d=lach.pw header.i=@lach.pw header.b=PDKZMoa8; dkim=permerror (0-bit key) header.d=lach.pw header.i=@lach.pw header.b=iP0Uvxxy; arc=none smtp.client-ip=78.47.82.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=lach.pw Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lach.pw Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lach.pw header.i=@lach.pw header.b="PDKZMoa8"; dkim=permerror (0-bit key) header.d=lach.pw header.i=@lach.pw header.b="iP0Uvxxy" DKIM-Signature: v=1; a=rsa-sha256; s=202502r; d=lach.pw; c=relaxed/relaxed; h=Message-ID:Date:Subject:To:From; t=1764139914; bh=xBHAbfvs3M52TAGHXMuwouD KJD5Hy5FqWvdsrTLN97w=; b=PDKZMoa8q/NuKWDviDdRo682mMMyHRWY/WMZVJvoUcsgiBbDmf XiR3qt5APE2cAfU/V/tezlVM+VYEBgNRMKvGo0JMyQcF5Mk9dWTaeOkIZ28n0dPnaVTJ4mNQsff ZmlYsL4M2BWs8MK5NFYbbxkT7BmOwj17HFNyxWnEukffBL/dRGv3cXTnuHBwo1Z5PLWlLuEtNXb qdTUJ0GTR574atCJ87wziLgdCNUbUsAEfnxcV7mLVFKPLRCqIloPixV6pDqF24dOTpwJD6yHBr9 f5RLf6QvIsBCioYDZo38wx+PXniTuRDwHv2XjClNlOUDcA2+9CuAVU7mtN5gXMwZMTg==; DKIM-Signature: v=1; a=ed25519-sha256; s=202502e; d=lach.pw; c=relaxed/relaxed; h=Message-ID:Date:Subject:To:From; t=1764139914; bh=xBHAbfvs3M52TAGHXMuwouD KJD5Hy5FqWvdsrTLN97w=; b=iP0UvxxyHoAGWMnLEAT4DoO+3yOQ3OEc98OJ39jeXI/cPFpSZv +YZab2VhY79iH5MkpRlWYKJuKUd1LCRk57AQ==; From: Yaroslav Bolyukin To: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Wayne Lin , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Yaroslav Bolyukin Subject: [PATCH v6 7/7] drm/amd: use fixed dsc bits-per-pixel from edid Date: Wed, 26 Nov 2025 07:51:26 +0100 Message-ID: <20251126065126.54016-8-iam@lach.pw> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251126065126.54016-1-iam@lach.pw> References: <20251126065126.54016-1-iam@lach.pw> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" VESA vendor header from DisplayID spec may contain fixed bit per pixel rate, it should be used by drm driver for the modes that declare they are only supported with the declared fixed bits per pixel value. Signed-off-by: Yaroslav Bolyukin --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gp= u/drm/amd/display/amdgpu_dm/amdgpu_dm.c index e6728fd12eeb..32370279283f 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6613,6 +6613,11 @@ static void fill_stream_properties_from_drm_display_= mode( =20 stream->output_color_space =3D get_output_color_space(timing_out, connect= or_state); stream->content_type =3D get_output_content_type(connector_state); + + /* DisplayID Type VII pass-through timings. */ + if (mode_in->dsc_passthrough_timings_support && info->dp_dsc_bpp_x16 !=3D= 0) { + stream->timing.dsc_fixed_bits_per_pixel_x16 =3D info->dp_dsc_bpp_x16; + } } =20 static void fill_audio_info(struct audio_info *audio_info, @@ -7071,6 +7076,7 @@ create_stream_for_sink(struct drm_connector *connecto= r, struct drm_display_mode mode; struct drm_display_mode saved_mode; struct drm_display_mode *freesync_mode =3D NULL; + struct drm_display_mode *dsc_passthru_mode =3D NULL; bool native_mode_found =3D false; bool recalculate_timing =3D false; bool scale =3D dm_state->scaling !=3D RMX_OFF; @@ -7162,6 +7168,16 @@ create_stream_for_sink(struct drm_connector *connect= or, } } =20 + list_for_each_entry(dsc_passthru_mode, &connector->modes, head) { + if (dsc_passthru_mode->hdisplay =3D=3D mode.hdisplay && + dsc_passthru_mode->vdisplay =3D=3D mode.vdisplay && + drm_mode_vrefresh(dsc_passthru_mode) =3D=3D mode_refresh) { + mode.dsc_passthrough_timings_support =3D + dsc_passthru_mode->dsc_passthrough_timings_support; + break; + } + } + if (recalculate_timing) drm_mode_set_crtcinfo(&saved_mode, 0); =20 --=20 2.51.2