From patchwork Thu Jul 4 13:52:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1127548 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="R5v4uKGN"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45ffZQ42YLz9sBp for ; Thu, 4 Jul 2019 23:53:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F0858C21D65; Thu, 4 Jul 2019 13:52:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EAA39C21DB3; Thu, 4 Jul 2019 13:52:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4BEBEC21DB5; Thu, 4 Jul 2019 13:52:21 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by lists.denx.de (Postfix) with ESMTPS id E4369C21DE8 for ; Thu, 4 Jul 2019 13:52:17 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id v14so6741131wrr.4 for ; Thu, 04 Jul 2019 06:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QyRCC4bUtDTkFoUgDa5zYvhIk1y06EaYmyazSTdlSTw=; b=R5v4uKGNiPPa809Sst8jAoTzFPM7sLWUnZlI/8inilO31i4r62SjH3afwB8vB5PY3p PA6n4RNkA3FGyVAT76cX3x5rL2xD0i4zqwC1k6bAVt3KLMhsnarEABHrAU70yuQjuhpa K3Oidgaaltf/QYW8EByo2/hSb2eDZrdcGHDiFPHBloJg+o6Za7ZsjHebAkcu9tvTAwtz EKy8oZ5WLmKRk6FNy2/GcSt6tSs25kMW0YJYM6gAgfDQU3mq3RNtEqNuFMNlcNthaPvM pgsLbGdQh1It/nygq7HcfD+qdW3peHiDQHbE9CKV3CCyXHHYPdmNNa4vINT51wi0uCr+ arVg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=QyRCC4bUtDTkFoUgDa5zYvhIk1y06EaYmyazSTdlSTw=; b=MJscL4rI+U3XdcVukkBoWikhTm6JKR4k84uC6RtThKICY8hyHFLouC0WGW3FSnn4F/ +RzDxX45gZiLHmwoZHguBTBg0Z+Cee1ZuHpzb7gEYtj7wqqQPpOkPh57A8TPvXJ83DDC DN6o89mztG+nZXR/ZgLyY3YHBbIw2k+54PzG5xv4vnUW6XCwEDT2TYhXCcyG4TPEDw34 P6MT0PBtEuzCwjECpbcQ07SOFew+JZi/KfD1/Liy+XFDFk2AQQf7MNckv0qIXEbw6kJ8 SitXYCNtyP/PW4GL8sI0VIC0Vr3xYvocmntRMAcQt+F6u4F21M7SubcvX4TolxWU5okM acSQ== X-Gm-Message-State: APjAAAU3hmw2MiLwd01uxOmS1S+V2cixBo6ZyJLXG9qxFni0fYhNRIUX bALjhTrVuAhtyosPgFX3JaIXkg== X-Google-Smtp-Source: APXvYqyE1bIv6+gJnZz7ELIoyDRwplx1fqPXdXq/Ho1e9RgKI0kba4ETEUHQ3Wkg0GSbcWH2dO12nQ== X-Received: by 2002:a5d:60c5:: with SMTP id x5mr20737318wrt.253.1562248337385; Thu, 04 Jul 2019 06:52:17 -0700 (PDT) Received: from localhost.localdomain (176-150-251-154.abo.bbox.fr. [176.150.251.154]) by smtp.gmail.com with ESMTPSA id x11sm4793199wmi.26.2019.07.04.06.52.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jul 2019 06:52:16 -0700 (PDT) From: Neil Armstrong To: agust@denx.de Date: Thu, 4 Jul 2019 15:52:08 +0200 Message-Id: <20190704135208.32104-4-narmstrong@baylibre.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190704135208.32104-1-narmstrong@baylibre.com> References: <20190704135208.32104-1-narmstrong@baylibre.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io Subject: [U-Boot] [PATCH 3/3] video: meson: dw-hdmi: add EDID mode filtering to only select supported modes X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add support for the new mode_valid() display op to filter out unsupported display DMT timings. This is useful when connected to 4k displays, since we only support DMT monitors up to 1920x1080, the 4k native timings are discarded to select supported timings. Signed-off-by: Neil Armstrong --- drivers/video/meson/meson_dw_hdmi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c index 483c93f6b6..617f75724b 100644 --- a/drivers/video/meson/meson_dw_hdmi.c +++ b/drivers/video/meson/meson_dw_hdmi.c @@ -426,9 +426,16 @@ static int meson_dw_hdmi_probe(struct udevice *dev) return ret; } +static bool meson_dw_hdmi_mode_valid(struct udevice *dev, + const struct display_timing *timing) +{ + return meson_venc_hdmi_supported_mode(timing); +} + static const struct dm_display_ops meson_dw_hdmi_ops = { .read_edid = meson_dw_hdmi_read_edid, .enable = meson_dw_hdmi_enable, + .mode_valid = meson_dw_hdmi_mode_valid, }; static const struct udevice_id meson_dw_hdmi_ids[] = {