From patchwork Thu Mar 28 17:17:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10875535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 448791669 for ; Thu, 28 Mar 2019 17:18:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D50228B49 for ; Thu, 28 Mar 2019 17:18:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11A0D28BE7; Thu, 28 Mar 2019 17:18:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B16E428B49 for ; Thu, 28 Mar 2019 17:18:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Co111u7RN44PvehZb0l9DFCL+k2ycC+ZluVpIfWxO10=; b=h+Pr8GXPxfxSlb vL/ORmpZmSYriI+PToD3g04qtP8KNf/p6sLg9STiJH+v0ViZJzj8+VsEAPIv0gbyCXWGZJzFHE50A 2YwzW0vC0/VKOxJzHxoclcVo8x+SnsCRR5NQyQ7NVZi/Grt9YCqzNCfTAIqNUxQFhUYCsWl/HNIH3 hHpzgrfxIR8cwmk0UYn3gZrRHKXj0a2t8SODWsEhw+YsYzUgbCF+ElgWu8r/h7tg7xEOIpxoj/9MJ nujRxKAIxWqfk5TZ6QrfJhP8rm7VM3oj6v5p/5GdQkgMcOPXnXEt1jt0OOlNl3SY11BfCzpwZ9+TF G3vegziQMX6jUy95U57A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9Yfj-00081U-9C; Thu, 28 Mar 2019 17:18:35 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9YfB-0007N3-N7 for linux-rockchip@lists.infradead.org; Thu, 28 Mar 2019 17:18:08 +0000 Received: by mail-pl1-x641.google.com with SMTP id cv12so5274485plb.9 for ; Thu, 28 Mar 2019 10:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9+yEi+eZPRH+2tNF2bctolAJluO+BQKUE1OpVezDcSA=; b=ahyaqNIJ3nvuHeJExphO1VeO7qSbhDDfzZtyX0NUYDMICqgtM1FMOHWoIt8X0eVJkU sLIofNxE3B9lS+QfPHYljZI1B1UYHuR68sEnfynCLhiB3wVJ8yRVOiXJEw4BYJV6qkUG cHD4O/9ddvUdyqk70Dzc5xW17c2feKrQKBSE4= 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=9+yEi+eZPRH+2tNF2bctolAJluO+BQKUE1OpVezDcSA=; b=qIFD+TewRwokffl/jztyLmITteeDhx21P0UQhD8JNjIfFQE8uwRhU0FHe+cf3vI8bt bDnnmjjm6tZEZMFB1opRIsWEEAncWDJmLyR1VJqGjw+8syZCx3778z1Av3qlm6bA/dAy VUN/ddPilhUDfPPTz68Dx81TngJ+dOBV45YzqVQwRA7JfV53qk/mcacBzpchu4ElugG4 mdaCDxhTwaeAqJNULm3zFr/nUQPWwgbZQLsjTuv4GrKPSQE7ATShN8khGokmjY/NJtLf sGGv6srzRnKtXFLZiQmUDSdyk57B+q1X/fVXidTOXOfqM3u95+owyevI8nv262hZiq+s rypQ== X-Gm-Message-State: APjAAAVCTQYSeRSyCCo/dih9RaXYQlalgIveAOKB01WMiJeLAHWhM32i jCb7XoJJVYDvh1XmPbrHam+JhQ== X-Google-Smtp-Source: APXvYqz+Bkkp+PP/tk6oZi4XfOa5OgocGBwGFvtt3gL1hPkppHgW5RmeCuO7qgvi9MsMhPiTQjbjlA== X-Received: by 2002:a17:902:b181:: with SMTP id s1mr43707502plr.321.1553793481001; Thu, 28 Mar 2019 10:18:01 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id r10sm31699414pfn.188.2019.03.28.10.18.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 10:18:00 -0700 (PDT) From: Douglas Anderson To: Thierry Reding , Heiko Stuebner , Sean Paul Subject: [PATCH v4 5/7] drm/panel: simple: Use display_timing for AUO b101ean01 Date: Thu, 28 Mar 2019 10:17:08 -0700 Message-Id: <20190328171710.31949-6-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog In-Reply-To: <20190328171710.31949-1-dianders@chromium.org> References: <20190328171710.31949-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190328_101801_967271_C09A49A6 X-CRM114-Status: GOOD ( 13.38 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , David Airlie , Douglas Anderson , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Boris Brezillon , Laurent Pinchart , Daniel Vetter , =?utf-8?q?Enric_Balletb=C3=B2?= , Ezequiel Garcia , mka@chromium.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Convert the AUO b101ean01 from using a fixed mode to specifying a display timing with min/typ/max values. The AUO b101ean01's datasheet says: * Vertical blanking min is 12 * Horizontal blanking min is 60 * Pixel clock is between 65.3 MHz and 75 MHz The goal here is to be able to specify the proper timing in device tree to use on rk3288-veyron-minnie to match what the downstream kernel is using so that it can used the fixed PLL. Changes in v4: - display_timing for AUO b101ean01 new for v4. Signed-off-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-simple.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 7d407fab3628..c6c0625e1684 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -568,22 +568,21 @@ static const struct panel_desc auo_b101aw03 = { }, }; -static const struct drm_display_mode auo_b101ean01_mode = { - .clock = 72500, - .hdisplay = 1280, - .hsync_start = 1280 + 119, - .hsync_end = 1280 + 119 + 32, - .htotal = 1280 + 119 + 32 + 21, - .vdisplay = 800, - .vsync_start = 800 + 4, - .vsync_end = 800 + 4 + 20, - .vtotal = 800 + 4 + 20 + 8, - .vrefresh = 60, +static const struct display_timing auo_b101ean01_timing = { + .pixelclock = { 65300000, 72500000, 75000000 }, + .hactive = { 1280, 1280, 1280 }, + .hfront_porch = { 18, 119, 119 }, + .hback_porch = { 21, 21, 21 }, + .hsync_len = { 32, 32, 32 }, + .vactive = { 800, 800, 800 }, + .vfront_porch = { 4, 4, 4 }, + .vback_porch = { 8, 8, 8 }, + .vsync_len = { 18, 20, 20 }, }; static const struct panel_desc auo_b101ean01 = { - .modes = &auo_b101ean01_mode, - .num_modes = 1, + .timings = &auo_b101ean01_timing, + .num_timings = 1, .bpc = 6, .size = { .width = 217,