From patchwork Thu Dec 17 14:09:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 345446 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp1951287ejs; Fri, 18 Dec 2020 00:32:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUFqw2W6u/o/uju/weCJIipHGBdF85XD9DkKF6FUfB/OL4Cbd/QeIvVObponErQOTIjMho X-Received: by 2002:a17:902:7292:b029:dc:ac9:25b5 with SMTP id d18-20020a1709027292b02900dc0ac925b5mr3488415pll.2.1608280369560; Fri, 18 Dec 2020 00:32:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608280369; cv=none; d=google.com; s=arc-20160816; b=Pm54OB9LysQzdUsQ9vDqdP3ydpVes/+O84G3kyviYrSfZ6VyJ75lVvgQeLVYsgPCEd Zq+RMUtTMuEqU6tLoUhBtILvdma6tnsEGa+X7BJJsEso1Fuk/KZW3KmZmrFOpEUrwRPu ljOBg5VNs7dVWWe1gtXJjKQJFOf6DWIil85BdnkxZnlFwRZE1PkwqUTSGVWeVUQx8JdD xIh+irTkOFJ5u2b83QzrAbcWWoopFxwvAVtvBuBDflHvXAfRHne9ENmmepQAtk5TISoe 2qtSYdzqn1SsT/CQwsUY+y++Fq/qqJC4/izISzS0CAPCLvuRdPI6/AkIWwUOE8OvuxKE cMqg== 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=pQdIEA7eMmo5SZYIkwztjrv+1AVH6K+WoeRNc8Y0+ws=; b=aYDbxD2OtdsB4xqC/4lku4bv3p/elknmduFfArlWwzaca1Ag/cjr9R03aFcxtsWdDX i8a8zS7mrQRzy0iA8lQNHFfNo+zBmUD02mD0DDwIqrwA4PF2vWM0ben/G9iuOH+sWw8W VkHkUiNsvlQ3z0miPGqD2Zo+2CYjmtgripk9hY1d8ivUHG2FFYEcJX78agWitfwkC3+b HmonCkWM3HCdNIFMvRrUaZEjkpEEVNDQsphxo6xxlFtQV6uJ09S84gfj8vnCoy5ahvFG 9mtxb5Q4rV9yds7K8s3KE6IajjZmS2PuScLuzcjlfFVZMJ90RYQdeI1q4JMnvMfnTeYD xRrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="p/AItOzq"; 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 z12si7226586pgo.471.2020.12.18.00.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 00:32:49 -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="p/AItOzq"; 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 8AC2489B0D; Fri, 18 Dec 2020 08:32:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by gabe.freedesktop.org (Postfix) with ESMTPS id 49CAD896E7 for ; Thu, 17 Dec 2020 14:09:48 +0000 (UTC) Received: by mail-ed1-x529.google.com with SMTP id q16so28752098edv.10 for ; Thu, 17 Dec 2020 06:09:48 -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=8d/TrR8rvr+bpGWFgQdRm4zLwdG7yWhGu84jcm2/M6g=; b=p/AItOzqqm4kqQMm0GgotlTXHPU2f50aB8mZ0r4vvT3PH9dE5ERqKtHkP/dZMwW9du Zoa5eVKoGJZKWD0W1XaeP6WI8mREKXn1pMkNa27jeqW/i4Lu4NjEqfIfOzxiemq4QQdu qP8xtB9RUiSRoHVTjlyi4M+xT3WoXb4By9kXGuDQ0W4ECrdVEs6/hKsZjCFoS241HeXx a8ZJdjfAszQV/EHrNP1cQD/NIkJYAAk/O2LeVUsBSa5/cZYfrQ5Zn2BICEIOABNuFiBl 6wQrGsdq2KdQNdcLOk1tAMeQmKPjFz4MM/jqxQ4KV72gXNpQndfe0YwCDRgsBIQVvM+m vd4Q== 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=8d/TrR8rvr+bpGWFgQdRm4zLwdG7yWhGu84jcm2/M6g=; b=jT7fw/59hLfT7znWMoCOOPv2ov8O74dQw0eRlQJ/fJia9rDPvkXYiKTk2Wm7/62u7c 1QqEwdqwTy3BTkt65rLOLR9U9pPi/QootFReaB5Cl+DrEOr0s+/UG6/jMBta71ag9C2U GZsU8u4/DM6vaRQkBvCkqTK4S5hnATMBjm+g5nT8WK6iG1tDLl/7uMunkGDMKIfb5XNa sce9OTiQiw1aOeMWvsa4clamL4AxzaVljV4sRUR5oPeiDNo/kLaJAT9jw/iKgJXE2w+5 yOmERzBcCSXknbEYho7notduQOXCSTCTZIaWZznPqXUgQ8IkdxxNoD49LRQoN3tiPquh X1zg== X-Gm-Message-State: AOAM532xkeLI3SixlMI41V4xlt0KUZqDTa0xwby5iRkcdz44fNF7ciiY Wv+YSflzrVmz/j4jzQhhRJWYTg== X-Received: by 2002:a05:6402:104e:: with SMTP id e14mr25376272edu.316.1608214186984; Thu, 17 Dec 2020 06:09:46 -0800 (PST) Received: from localhost.localdomain ([2a02:2450:102f:d6a:f0ff:2796:69b1:324]) by smtp.gmail.com with ESMTPSA id pk19sm3864078ejb.32.2020.12.17.06.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 06:09:46 -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, Peter Collingbourne Subject: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels Date: Thu, 17 Dec 2020 15:09:33 +0100 Message-Id: <20201217140933.1133969-1-robert.foss@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 18 Dec 2020 08:31:48 +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: 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 Tested-by: Anibal Limon Acked-By: Vinod Koul Tested-by: Peter Collingbourne Reviewed-by: Bjorn Andersson --- 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 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)