From patchwork Thu Feb 8 17:48:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10207595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0437B60247 for ; Thu, 8 Feb 2018 17:49:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9C5829142 for ; Thu, 8 Feb 2018 17:49:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE91F2959F; Thu, 8 Feb 2018 17:49:26 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 6E15729142 for ; Thu, 8 Feb 2018 17:49:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A59C6E64E; Thu, 8 Feb 2018 17:49:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-x242.google.com (mail-yw0-x242.google.com [IPv6:2607:f8b0:4002:c05::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8E2BE6E64E for ; Thu, 8 Feb 2018 17:49:24 +0000 (UTC) Received: by mail-yw0-x242.google.com with SMTP id t129so3195876ywc.3 for ; Thu, 08 Feb 2018 09:49:24 -0800 (PST) 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=ljOeTMEU3kVaA+UMOIKpPKQ0pP4tDzOXVuigxPzlAnI=; b=asEzofJxte83GUe+2vVxolMorvisWwYyu8BEp6778D2DNS7VlxKkaK76qtilOg8KiW H8taHs0p3f7x7SIY13qsQ+S2IT1yJIZlYbvsrlsZj3zKgCHw1WLe+pyz9YZpwB7FgtZE Anc4fcSVWAp7yZBcLCsFTY1wrrvkhhe8UZHPA= 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=ljOeTMEU3kVaA+UMOIKpPKQ0pP4tDzOXVuigxPzlAnI=; b=aKIOf/GGL+yvcdkR3yAYy8IhX55WA4F6pRPYjdCXnsIw69d0lVAMaCxtd1U7/llYx/ ebqDSBsP1o8fox98tsepW119b0yJgm7qVE1xs8fSC3e02YUGQG6LJ8aKfeyFqMygstEG yQId31dKsAFH07jynYjHjROeM5yLMSdJ3x1+ugOElxShxPm5H3edynESXoQO4z9y7O0b hdP7pK33YkGD8ykK+B+an/j5sP3Prfv971tiZBKlQgplw5pOehyqB6u/o9iOKqNBIIkK zkcr+yK64jPFocrdHougp43Jsj29QJr80u9C83wG0RnRGq/8sjgc3+ybwqJG/EFvJpJi jIAQ== X-Gm-Message-State: APf1xPDlY/p1Tl4HQyRkqDk7QuSH6ct2vujXLYf2tTAViLqjnLAC63GC TCXZiBld1I2RRT1JXA4m6Fqvmf/vg1s= X-Google-Smtp-Source: AH8x227/VCgjhrKS39MUPrdPrYRTMUfLWrIE0+oXWzr/VM2P9KNR7QbnuDvfRYVcMoz54tezCl5p3g== X-Received: by 10.129.113.11 with SMTP id m11mr5453ywc.240.1518112163736; Thu, 08 Feb 2018 09:49:23 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:d3af:69ac:1964:28e8]) by smtp.gmail.com with ESMTPSA id t73sm177220ywg.10.2018.02.08.09.49.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 09:49:23 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 5/6] drm/panel: simple: Use display_timing for lq123p1jx31 Date: Thu, 8 Feb 2018 12:48:52 -0500 Message-Id: <20180208174855.55620-6-seanpaul@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180208174855.55620-1-seanpaul@chromium.org> References: <20180208174855.55620-1-seanpaul@chromium.org> MIME-Version: 1.0 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: Thierry Reding , Jeffy Chen , Doug Anderson , Rob Herring , =?UTF-8?q?St=C3=A9phane=20Marchesin?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Convert the sharp lq123p1jx31 from using a fixed mode to specifying a display timing with min/typ/max values. This allows us to capture the timings set forth in the datasheet as well as the additional values that we've cleared with the display vendor to avoid interference with the digitizer on the Samsung Chromebook Plus (kevin). A follow-on patch will specify the override mode for kevin devices. Changes in v2: - None Changes in v3: - None Cc: Doug Anderson Cc: Eric Anholt Cc: Heiko Stuebner Cc: Jeffy Chen Cc: Rob Herring Cc: Stéphane Marchesin Cc: Thierry Reding Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Sean Paul Tested-by: Enric Balletbo i Serra --- drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 87488392bca1..6de9c39bc182 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1806,23 +1806,22 @@ static const struct panel_desc sharp_lq101k1ly04 = { .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, }; -static const struct drm_display_mode sharp_lq123p1jx31_mode = { - .clock = 252750, - .hdisplay = 2400, - .hsync_start = 2400 + 48, - .hsync_end = 2400 + 48 + 32, - .htotal = 2400 + 48 + 32 + 80, - .vdisplay = 1600, - .vsync_start = 1600 + 3, - .vsync_end = 1600 + 3 + 10, - .vtotal = 1600 + 3 + 10 + 33, - .vrefresh = 60, - .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, +static const struct display_timing sharp_lq123p1jx31_timing = { + .pixelclock = { 252750000, 252750000, 266604720 }, + .hactive = { 2400, 2400, 2400 }, + .hfront_porch = { 48, 48, 48 }, + .hback_porch = { 80, 80, 84 }, + .hsync_len = { 32, 32, 32 }, + .vactive = { 1600, 1600, 1600 }, + .vfront_porch = { 3, 3, 3 }, + .vback_porch = { 33, 33, 120 }, + .vsync_len = { 10, 10, 10 }, + .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW, }; static const struct panel_desc sharp_lq123p1jx31 = { - .modes = &sharp_lq123p1jx31_mode, - .num_modes = 1, + .timings = &sharp_lq123p1jx31_timing, + .num_timings = 1, .bpc = 8, .size = { .width = 259,