From patchwork Tue Oct 31 13:26:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 160112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp238274vqg; Tue, 31 Oct 2023 06:27:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkAbf5Ma7+QJe+ydi0Mbp0u6vjtzsQ+OirJL2DH3Z1Ca9PJfhavqmB0VbENidENO8TA/jj X-Received: by 2002:a05:6e02:2195:b0:357:a049:91c4 with SMTP id j21-20020a056e02219500b00357a04991c4mr14551997ila.22.1698758857248; Tue, 31 Oct 2023 06:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698758857; cv=none; d=google.com; s=arc-20160816; b=m34ckTf3oIp/g8BCBKL0FM5IASXZWlE+WbllToQ/198UliHtV9is4xvuuMjmtaqIki cerzsqZc7NtmK1dK3bucoNXsHjAuT4KlJ49N0JMClkipfxONqje1iAyEwpNtFvi1gvVt 8BFz+mg2IHNgJHoFlqMLJmLBolJ3fe/R8ZwR/ANVjgJuFvsl3g95EACtcNUwEksB0uVJ RJZor8tKmR9gQNtHfLICoiebj0DQHP0vfhHwjie0RJY/VigmgWczrbV3bFtdDe3xAo2c VuAMqfefJOaYPkESSlYMajTyCVxOU7kPFshCM9CTp6k8HcmYoXrgxAhlsUrEkrDTQeT1 D4rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=uiyzzhWMq93/9+K4rb/SPY2DjJUQKcrGcCAqBGgAKiw=; fh=bpp/3S1Fl0AhI4Z5K3UWdDvav5T/++yXwguVMoLrE64=; b=VPwp5O3hm0EKw0d5ZNidUw466IshErc0h1pMftqv+BegweCuDwsHdN4RYUmljg5boI sWjWGSA+TZbJJW7knc4BmHkhQdcRrPqy79GhaMlKZFdh/GgN+Ji4p6vlOQLCp43aJYD1 Nz0UkF+aH/2IMNrFBcLeQLG8HpaR8eY0d/NBRzLT5iP9Ls5VOgQMsGg0pOynZLS18flV GEkL6v8ZOGGIs9V7FLFIub2sUCIAYnla87W2QLVs0ki73cJvfYBYau4mGTQnVnAc+5th 6HEa1cg5Foy771I+2WIdYnkMpI2KcU+Xq3N43pkmyYZbyzjIPJwwlsrmXD7dumt5oWUp bIWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cuo7+oiO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id a27-20020a63705b000000b00577448019b5si1006444pgn.276.2023.10.31.06.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 06:27:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cuo7+oiO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6596D80A97E3; Tue, 31 Oct 2023 06:27:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344545AbjJaN1U (ORCPT + 33 others); Tue, 31 Oct 2023 09:27:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344535AbjJaN1S (ORCPT ); Tue, 31 Oct 2023 09:27:18 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC25AED for ; Tue, 31 Oct 2023 06:27:15 -0700 (PDT) Received: from [127.0.1.1] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 13F3B4A9; Tue, 31 Oct 2023 14:26:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698758817; bh=+uIN4a7j7jvqB/Afca9rRMkdlKKkK6ohIxcjZmyHfgI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cuo7+oiO2aGu04b0wMxGP24+NwnwT4oOYmLulFS704RgfIg+VVYZyezOkBNYVs7Ok K+ULaHhucpyI4hWrAvJxLAET4sSaWZfpQRtlSIWlqxn4BGxS0TYd4brTdnCoGZC1+B LNfWwudfUeEJwIDmANU47FqKlP+KUnqlJskGxT2A= From: Tomi Valkeinen Date: Tue, 31 Oct 2023 15:26:55 +0200 Subject: [PATCH 1/2] drm/bridge: tc358767: Support input format negotiation hook MIME-Version: 1.0 Message-Id: <20231031-tc358767-v1-1-392081ad9f4b@ideasonboard.com> References: <20231031-tc358767-v1-0-392081ad9f4b@ideasonboard.com> In-Reply-To: <20231031-tc358767-v1-0-392081ad9f4b@ideasonboard.com> To: Aradhya Bhatia , Jan Kiszka , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomi Valkeinen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2282; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=jVTPWrjgsKMW/qtR79Ku6kUwvIkxeLjstze2bG/t+Zs=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlQQCulYmrm50A7iJtLSCIwC/v2Uy7SATRXLOL2 oXXTD6gFa2JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUEArgAKCRD6PaqMvJYe 9dKJD/488dgCjJfaiAcyg1qblGtN3jxO0ln8nf7xMyTESsJdrmALTblQzobmVQwGFNEiI1famTt luQiMCHmnhLAZgtEPtmONXHAZMTb1QWuinKdN21YR8jQOD4LpaDHNlOq7S6TP2qQwYMK4CqW0a4 68EGkDVRTwR+4ixsIORadKvQ9+7Ho46n9teDOXNZ6RgCShsJZLfvhE7OXf6lO3vRJm8XAteKVHV IKKvXMDzHzFCJMFnfjrGbmcT//5O8jzLEU6kKOGvtMS+inhlPrd+GcsFDJh6om5vQB+au9COSAS rMK89+lWCSGwF8blJPHzrmVgogTAghzrWFYRTs9Z/Z7ePVIqh6ApPMwkcSjDioCu9G+iT5Y6fpR bTcYh7mSvofLdu6UmtlldTADBLCDsfyvrdefoFj6GJJ74XzvlfG284zAMTo7g6HiNVj+0QiW+Zy ofLvIAgYEXsgd0bjzQ36IIqunrNG+XUcrGzsWhw9do124K0iRM+YN7qyMdccicJNzxO54k+E06z n9e0Lc+Imr8iLfIwWgOtCfV2Dy8Sc57tsX92sr4jTgyXttP1XW9QncR+B7fwgQzSEUpkxLRqF7D IhetFhNGhMNv04KD8qIpaG6f6cw1I3omcDoZP+308F60pK/FuFJABk3+y+7RDvP5TWgZwkasWgp kQM+9RulM7xpOQg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 31 Oct 2023 06:27:34 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781277767122277574 X-GMAIL-MSGID: 1781277767122277574 From: Aradhya Bhatia With new connector model, tc358767 will not create the connector, when DRM_BRIDGE_ATTACH_NO_CONNECTOR is set and display-controller driver will rely on format negotiation to setup the encoder format. Add the missing input-format negotiation hook in the drm_bridge_funcs to complete DRM_BRIDGE_ATTACH_NO_CONNECTOR support. Input format is selected to MEDIA_BUS_FMT_RGB888_1X24 as default, as is the case with older model. Reported-by: Jan Kiszka Closes: https://lore.kernel.org/all/24282420-b4dd-45b3-bb1c-fc37fe4a8205@siemens.com/ Signed-off-by: Aradhya Bhatia Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358767.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index ef2e373606ba..0affcefdeb1c 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1751,6 +1751,30 @@ tc_dpi_atomic_get_input_bus_fmts(struct drm_bridge *bridge, return input_fmts; } +static u32 * +tc_edp_atomic_get_input_bus_fmts(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state, + u32 output_fmt, + unsigned int *num_input_fmts) +{ + u32 *input_fmts; + + *num_input_fmts = 0; + + input_fmts = kcalloc(MAX_INPUT_SEL_FORMATS, sizeof(*input_fmts), + GFP_KERNEL); + if (!input_fmts) + return NULL; + + /* This is the DSI/DPI-end bus format */ + input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X24; + *num_input_fmts = 1; + + return input_fmts; +} + static const struct drm_bridge_funcs tc_dpi_bridge_funcs = { .attach = tc_dpi_bridge_attach, .mode_valid = tc_dpi_mode_valid, @@ -1777,6 +1801,7 @@ static const struct drm_bridge_funcs tc_edp_bridge_funcs = { .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, .atomic_reset = drm_atomic_helper_bridge_reset, + .atomic_get_input_bus_fmts = tc_edp_atomic_get_input_bus_fmts, }; static bool tc_readable_reg(struct device *dev, unsigned int reg) From patchwork Tue Oct 31 13:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 160113 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp238401vqg; Tue, 31 Oct 2023 06:27:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6daNpHXBw7DR/zhu1tb8V/FriJQHthS4Zn+OzJe6YrOcjLzhT6HcZfFI5FSKwmBhVveEo X-Received: by 2002:a05:6a20:8f1f:b0:174:af85:9626 with SMTP id b31-20020a056a208f1f00b00174af859626mr11697340pzk.11.1698758869066; Tue, 31 Oct 2023 06:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698758869; cv=none; d=google.com; s=arc-20160816; b=TsNytcqe9fkSoTGxAurckdhpTQ7CzWPoPwViaHo9q10jLd9jCARJLukSItlmoE32Xt GXP13WO/+/cg/4brNaWgltx5APLj/e3c1SClQhOGtcqM2sZmQbhi5Gb/Ls1beJQRUmIs /5wS/bdLQbhbJ/VUfqNmS30jVH8MAYMNR48mM9+erwgLPuu7QsGCrjZN30385eHuVvm2 zhFb8og5bk8YB28j1Dj8QjupGgTSs3tog5PWWV/pujURNGJOwMlKhYU9nzTe8+qcSiQu omWJcQYVNjEm5FQN1hazQkBuCuuzcOOmUWJcx7Ow3tMsCqgjoaMF8bNS0mq5EVW7ivT2 Dj5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=415Y3ikchYtLA75uaBCPbR/z/LEhYy+UGrCfmz+wmnA=; fh=bpp/3S1Fl0AhI4Z5K3UWdDvav5T/++yXwguVMoLrE64=; b=lXnLOKh/7ARGpsAMuQlhPTG1kyaOAPhM/C10E/C/tZww7s309anwgqg113oe3bPpJf VcJ2s8/ZkC0xx2rQyKmFEbYZa+Ql6aQGw09XCgn8XBX/BMFqOLp9ztlsutRgXIAwQNz/ 05pvIlf0jO5QyaD+MruZlz93flHyQVK5Jq6jxh9lXX4aGaSOrP4JT0dVEZger6SWaZsh UN5qaxVttodgZlxkQQNYr1CsoUFp3xG5eSW/QYjsL36CchQZj01oUydPT6enivTqpGtU JNEAcX062SVL5CuvbrZJ/2lTkozdY0sMrWR9EeYKpN8Pt2qh7XiCi6Ph+xC74dWb1C7r XffQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vmZZh7wY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b4-20020aa79504000000b006b7b42fe43asi1000543pfp.185.2023.10.31.06.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 06:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vmZZh7wY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8BD8C80BA68C; Tue, 31 Oct 2023 06:27:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344524AbjJaN1Z (ORCPT + 33 others); Tue, 31 Oct 2023 09:27:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344548AbjJaN1U (ORCPT ); Tue, 31 Oct 2023 09:27:20 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25BA3F1 for ; Tue, 31 Oct 2023 06:27:17 -0700 (PDT) Received: from [127.0.1.1] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1569F5AA; Tue, 31 Oct 2023 14:26:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698758818; bh=I/CtWgvz0BJifB1qTHPuDWeeFWh42GIeJ7wx1VtfgUE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=vmZZh7wYPTXo5fLBTB1h+AraB7Gbk13wHg5d+3Ph7aveao9K9jlrjKMnEYB1cyN7Q 26ocM3/kwMDCEaU48NDJbcqK56Qt+S1MdT/IKmDqz8H0zIDV8tHXydV6n1Sf/me4Cb Aaoq9D8idueOswN73o0RdyKGqDfXemsi1DUyedqw= From: Tomi Valkeinen Date: Tue, 31 Oct 2023 15:26:56 +0200 Subject: [PATCH 2/2] drm/bridge: tc358767: Fix link properties discovery MIME-Version: 1.0 Message-Id: <20231031-tc358767-v1-2-392081ad9f4b@ideasonboard.com> References: <20231031-tc358767-v1-0-392081ad9f4b@ideasonboard.com> In-Reply-To: <20231031-tc358767-v1-0-392081ad9f4b@ideasonboard.com> To: Aradhya Bhatia , Jan Kiszka , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomi Valkeinen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1647; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=I/CtWgvz0BJifB1qTHPuDWeeFWh42GIeJ7wx1VtfgUE=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlQQCvB7wrB7TMKnDKR6rRauEEUAKRUabrIZ4OB BOeFOvaEY6JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUEArwAKCRD6PaqMvJYe 9UfAD/0c/gKIkRmx+ScHQe3PosmKMmN/Bvt6Y+Rq4GX/xx+IS1+eDx/L5pTPvYRCdOSno5JCJ6a 5w41PEgl9vSFftu75TYs0A5KwOo4JctKBQbHvpvaG55VGtodZtb2CfuGdp9sjUdT+DAUWI41Nhg 4aaIe4aYlTcsTsQwgZ+jF2wBfj73+JBENg8k2aKWUO3o/U/Z0N94JGIBnc+qAhTB/UDWqVQLOsg hJC3tnmulrPwGSVQUeSSmj+gyAuZsk3Dg8+NbdX3Jb1Ge/ds0E2daFHjjoHKkXFBqEaChR45eR+ wG0G195/F4Bqd+/hW8FQDl0K3WT8oulo8EFeYPouQ26w+LtfZdZhIUNSTktPCCjy+rWGREx0s3R uuPWD2totclIyiOy+RWFT1x2KLrF7ivYd7b8KdjxUc5f78BB36QzttdGTl1oFWGRhDChxty6+Vc K+VsKGd8qKminlqdrIAnkXGB/NIflfP6ARpBc5FZOG5wjhQ6NzybMW44fRxr8buxYijp9+6Cc+/ NjDrbZpInP+KHANRuS9k6MOD/fr2oLTuk6vvIZprjg6AJ9haU4or3ej5uyCZcRuk7Dpck4STLuv 2xx/wglVjRxpOu1UlEmMaKKarfdymQsgcMFtrkBSZ/rIHb5WV7Z0S3tYUvjVtgIi7pl6e7hD1P1 QFE34g+AHAuTEew== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 31 Oct 2023 06:27:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781277779933450255 X-GMAIL-MSGID: 1781277779933450255 When a display controller driver uses DRM_BRIDGE_ATTACH_NO_CONNECTOR, tc358767 will behave properly and skip the creation of the connector. However, tc_get_display_props(), which is used to find out about the DP monitor and link, is only called from two places: .atomic_enable() and tc_connector_get_modes(). The latter is only used when tc358767 creates its own connector, i.e. when DRM_BRIDGE_ATTACH_NO_CONNECTOR is _not_ set. Thus, the driver never finds out the link properties before get_edid() is called. With num_lanes of 0 and link_rate of 0 there are not many valid modes... Fix this by adding tc_connector_get_modes() call at the beginning of get_edid(), so that we have up to date information before looking at the modes. Reported-by: Jan Kiszka Closes: https://lore.kernel.org/all/24282420-b4dd-45b3-bb1c-fc37fe4a8205@siemens.com/ Signed-off-by: Tomi Valkeinen Reviewed-by: Aradhya Bhatia --- drivers/gpu/drm/bridge/tc358767.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 0affcefdeb1c..137a9f5e3cad 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1579,6 +1579,13 @@ static struct edid *tc_get_edid(struct drm_bridge *bridge, struct drm_connector *connector) { struct tc_data *tc = bridge_to_tc(bridge); + int ret; + + ret = tc_get_display_props(tc); + if (ret < 0) { + dev_err(tc->dev, "failed to read display props: %d\n", ret); + return 0; + } return drm_get_edid(connector, &tc->aux.ddc); }