From patchwork Mon Nov 23 10:46:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 331376 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp316755ilb; Tue, 24 Nov 2020 00:09:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzi+IJge3Us8ukwQMIz4TMN13pFE1rTAENBauBWUTaZWoM9t+Eo91em/BHOK0lkQXYSww27 X-Received: by 2002:a17:90a:c401:: with SMTP id i1mr3386878pjt.184.1606205351825; Tue, 24 Nov 2020 00:09:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606205351; cv=none; d=google.com; s=arc-20160816; b=edvfF8O3/HomhmR2q11AFzsnMA5iYfgZSkErCQ9ZGzAodxc5UH7cRPEEvtCwy3XyHO G7T/jY+WCjVfJ8nuex0zSaYwGxJmx1CMbBpIuR4vCP5Jn/h+LM4HgTAIyYwEMQDP591T GqYkW8sO64MgVH/IKyA0PDka6ynyEsQINxYMxi0aRxzxyeSq3GM7IygVJCQkTuEMUe5M bYjXLtNiAHQD7Cx/yXD2zB6BE5bjFjmtrQ2/eGrg9OIPm7A9AjLjOVtazrsEZ5LtvDoy iBE38ezsNj2bhnBtcL4Fo5Ez7JHRAnblul4IYE2k5YPrtXf8+biGLDu0kLZomozCCKx6 c0fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=7UWNREx5eFslORuimmjWNZUkWSNJFR5DdJCtv1cqtvw=; b=qn+S7M8mAEopvchyuo2CbEYlLXmTl1u/wpEPOJdBCysHt/twj36MtVEW+NcfseIClV u2QbrtiOxuqIhi0W4ntSolzUXvgnwD93fZgp6tySlS+qccQRI9WK45zM0+tAGPYeoE6L S7fcgvuR9AWqlHsdeYUd33UqTKSFcziCS/BINhEgRjOkrFNecIx3cJdXNeMMTfpw+4zd QbpKNVYEGyZhXikWRbeuSORDrJEWmcE465WMnhIy27SGJhxnf0DQOD7Pdp83u59qWvf2 wlOoWbG1eXr6OHEK4tz5lQC4Fosz/vH3Ffq8e4SRMO1uZcpdtwZgOtkiqqvnoMecQNlz 3U5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="VyY/UaY2"; 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 q12si10129062plb.280.2020.11.24.00.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 00:09:11 -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=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="VyY/UaY2"; 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 02DCB6E235; Tue, 24 Nov 2020 08:08:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2CBAA89CB9 for ; Mon, 23 Nov 2020 10:46:51 +0000 (UTC) Received: by mail-ej1-x643.google.com with SMTP id bo9so16836619ejb.13 for ; Mon, 23 Nov 2020 02:46: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:mime-version :content-transfer-encoding; bh=bf3Dad1zscNI33FoKwPu/py5sOPRwrYDQb8QYdxZRy4=; b=VyY/UaY2A1uZvQ9rve79LjJiOJL1CI3dvsrV3swg09sAABwIgosjjta5q8zhkrPoZZ 5zImlhFEsF3ai58SF4irPNNvGoRzCyvQztYAx8s+zLmSXjGZPa4RtMzUBMMT0cLt23/C yHjZ1Yj8/hds3Ex7rjyXLJLmFMIi2ICX9C4t2uVm1Fse395iKjIwzbqEi+10ZfRgT6Iq sAq6GIQrrm5vWPAyO3ox79zmrxHRCEhXPNxlT816oaz9+2B3VFo0jHrGboJxWIB/PPoG 7W+5YxoOUheRkD5Zysd3l0azMFn4ne6mj/iIiaJTmtMLK+ufVDO7sVGtP0KrUy8Hs0Lm QdQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bf3Dad1zscNI33FoKwPu/py5sOPRwrYDQb8QYdxZRy4=; b=YQZShUf40N6/Okpu9tfERcmeA45aFJpmp/CdKUTihOKoQZRsYDi8Q37xU3vGPmg4Yk OWI9Vy6o5zcjGOhHhcBEWe/a38+HkG0G2jhuXz7PEh21AzSwq03y9+tcyM+f5FzpefFb 8o4qwAdWJO+tYQwd5SrOT/ritEy2m+oe67GamRtnfX7/EaCix5BE+1XUeXxmhVgjKajx LGmQ7Qi2YQP/bkBGiGFXhgR0JgQ69fDVzvfvd7qAGlPgiW4khoB1cqiHnEA2P1/aVuzP HDZl6sQcXc+KzzYNG2fYida89dvpdUhDWC0J2CqJCT3oG/3SH9fq2Q6WUSpcWg7ybTDJ 74UQ== X-Gm-Message-State: AOAM532hOlnq44ZarxSGiueHVsnd84KTEa/mXqRFsEEX514yInPfCGAD KXlgdgK65msl+rFkm7qV4sdO/g== X-Received: by 2002:a17:906:468d:: with SMTP id a13mr45376085ejr.253.1606128409768; Mon, 23 Nov 2020 02:46:49 -0800 (PST) Received: from localhost.localdomain ([2a02:2450:102f:d6a:f25:a362:ce86:20d]) by smtp.gmail.com with ESMTPSA id gf9sm4792416ejb.18.2020.11.23.02.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 02:46:49 -0800 (PST) From: Robert Foss To: a.hajda@samsung.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, John Stultz , Peter Collingbourne Subject: [PATCH v1] drm/bridge: lt9611: Fix handling of 4k panels Date: Mon, 23 Nov 2020 11:46:16 +0100 Message-Id: <20201123104616.1412688-1-robert.foss@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 24 Nov 2020 08:08:40 +0000 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: Alistair Delva , Anibal Limon , Vinod Koul , Robert Foss , Bjorn Andersson Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 4k requires two dsi pipes, so don't report MODE_OK when only a single pipe is configured. But rather report MODE_PANEL to signal that requirements of the panel are not being met. Reported-by: Peter Collingbourne Suggested-by: Peter Collingbourne Signed-off-by: Robert Foss Tested-by: John Stultz --- drivers/gpu/drm/bridge/lontium-lt9611.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.27.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Tested-by: Peter Collingbourne Reviewed-by: Bjorn Andersson diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c index d734d9402c35..e8eb8deb444b 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c @@ -867,8 +867,14 @@ static enum drm_mode_status lt9611_bridge_mode_valid(struct drm_bridge *bridge, const struct drm_display_mode *mode) { struct lt9611_mode *lt9611_mode = lt9611_find_mode(mode); + struct lt9611 *lt9611 = bridge_to_lt9611(bridge); - return lt9611_mode ? MODE_OK : MODE_BAD; + if (!lt9611_mode) + return MODE_BAD; + else if (lt9611_mode->intfs > 1 && !lt9611->dsi1) + return MODE_PANEL; + else + return MODE_OK; } static void lt9611_bridge_pre_enable(struct drm_bridge *bridge)