From patchwork Mon Apr 1 17:17:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10880379 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 D5938139A for ; Mon, 1 Apr 2019 17:18:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3A492889B for ; Mon, 1 Apr 2019 17:18:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B13F32889C; Mon, 1 Apr 2019 17:18:07 +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,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C3722889B for ; Mon, 1 Apr 2019 17:18:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02E956E6D1; Mon, 1 Apr 2019 17:18:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by gabe.freedesktop.org (Postfix) with ESMTPS id 45CF56E6CD for ; Mon, 1 Apr 2019 17:17:59 +0000 (UTC) Received: by mail-pl1-x642.google.com with SMTP id d1so3117953plj.8 for ; Mon, 01 Apr 2019 10:17:59 -0700 (PDT) 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=cO/cQaH1v0hX6Qz410Ge9xQkBdtOiVN2dUqA1uOBt9tGDbPJCHMeYiUXGTzy+QFCjN B4qQDVKp30Hg7kn/rr55xlssyZ07MjrnCBY+blXj1UNJxpidfzgQ02/Km6/Ig3ZN0wfK JB91YXkt3FOFEF8rRSMNDtfiLe59jNOlCb6fpSElDUPrFWFpShXSXUynjZCEA1GJ8Nfj fFXLdKDBNXVO66qMdrP1Lp9pL5VY41StO0/G/4/VjCUnV/S3aZPK2AkDAcIels/qn/9r Qe38mfbgVihgge6XEEMC2Ks1wW/g9WW78+zVF/Iqj3GQX2dAzadyvobphI1snji8oYsG QBPA== X-Gm-Message-State: APjAAAVNt02mIQxLGqkM+oeV/OKWP46EwQr0CEngm31NcwLRKXOYYw1V CvLfR6UxdfRtvVdU8TOqzoDYKg== X-Google-Smtp-Source: APXvYqwsrsnX3TgFBk+xfMZJH+DRvLR+ODZiYbrm5+sGoWgrtImzbHOLY9s9TrJ/xiwEuUv4+b+nUw== X-Received: by 2002:a17:902:b281:: with SMTP id u1mr13101656plr.30.1554139078791; Mon, 01 Apr 2019 10:17:58 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id y12sm31370112pgq.64.2019.04.01.10.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 10:17:58 -0700 (PDT) From: Douglas Anderson To: Thierry Reding , Heiko Stuebner , Sean Paul Subject: [PATCH v5 5/7] drm/panel: simple: Use display_timing for AUO b101ean01 Date: Mon, 1 Apr 2019 10:17:22 -0700 Message-Id: <20190401171724.215780-6-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog In-Reply-To: <20190401171724.215780-1-dianders@chromium.org> References: <20190401171724.215780-1-dianders@chromium.org> MIME-Version: 1.0 X-Mailman-Original-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=FANOS7G6CCChbVSnGdD6PqovmIGZ5ltUFFDuywuZ2bdpjSSJT3VhotXLReNuTaLw2K +NKAbyURPQWK9gsM2c2SGXPzRt3EU8Qft3BusLKHsE9aScBUEp5c9mFhTZ1e7nu7xJDA N9HLmmLT97DnMSXBYZJ+aKX46+tc/3+CwDoDk= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development 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 , =?utf-8?q?Enric_Balle?= =?utf-8?q?tb=C3=B2?= , Ezequiel Garcia , mka@chromium.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Acked-by: Thierry Reding --- 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,