From patchwork Tue Feb 6 16:56:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10203485 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 E819C60247 for ; Tue, 6 Feb 2018 16:56:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C623C28173 for ; Tue, 6 Feb 2018 16:56:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAFDF288ED; Tue, 6 Feb 2018 16:56:51 +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 6878B28173 for ; Tue, 6 Feb 2018 16:56:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 97ADD6E4AF; Tue, 6 Feb 2018 16:56:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-x244.google.com (mail-yw0-x244.google.com [IPv6:2607:f8b0:4002:c05::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id A8D9D6E4AF for ; Tue, 6 Feb 2018 16:56:49 +0000 (UTC) Received: by mail-yw0-x244.google.com with SMTP id v196so1795012ywc.6 for ; Tue, 06 Feb 2018 08:56:49 -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=n0W8QfjeWYtqzZe+AgmJ6e/rc4YRsQjGfMk8788BCUo=; b=n0c0AvqhsvmqPRZAxh+P9BY/GG4qaPG1M+QaSYTisuVP4PoC8gOGGEwhhLBJ39zLtX QsfWS5aR/CAArjJKWjay/u/Ct/Xarv60s/xC2fKrD0aYnw3JwlXSx4gts8lB4GK476QQ uAwkUCsZ5GF92XtbSdZpbZ2aG3KDu5kw0xrEA= 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=n0W8QfjeWYtqzZe+AgmJ6e/rc4YRsQjGfMk8788BCUo=; b=cC55Z7SkwbbJR1d+xRW90bIKWweqz0a8yL03zzIca0fHbU5pPLjuj6CVWIEDecxcYE 5FBsJMkCrBRqhLSZ0DXGvLy0hiIHuc1D+rpQJbAV+27fLc3LD9LoTUNBt278vEuUNTLv bB+FaLfgLwippjJJK/ZESRCGxQ1WKuuXO6jqrgpweN7tj+GTENW5tZ+7rtvEC4BZlYOu 52OsVu7qgHDjy4w2iVYOsFfGdeEBfdVxetFR2mJeZACoOXAACo+fruYkzd2vVYQ2oJ6e wNaReb77HuJj8LJ+HApiZT62CLwrc7w2BtzcGE8i1+9GJ2urfTwSvo+QjHpebYk/4ktP wW/Q== X-Gm-Message-State: APf1xPCq/GfE/N59wJhsO5PA1xrLTESsYkCOf9dOnI5CdknnZrBJ1Ucc s2ZXFD/Q0kk5WjkMBv4MEvfVbt13V24= X-Google-Smtp-Source: AH8x227gCgFRyLApAezWOR231G4Vsa2FOorT8vf/6r4n7RlQgSFTeip7uHC16iXv07Yon5ug2Qag6w== X-Received: by 10.129.116.67 with SMTP id p64mr1829749ywc.110.1517936208817; Tue, 06 Feb 2018 08:56:48 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:d3af:69ac:1964:28e8]) by smtp.gmail.com with ESMTPSA id z77sm4004805ywd.21.2018.02.06.08.56.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 08:56:48 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 2/3] drm/panel: simple: Use display_timing for lq123p1jx31 Date: Tue, 6 Feb 2018 11:56:21 -0500 Message-Id: <20180206165626.37692-3-seanpaul@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180206165626.37692-1-seanpaul@chromium.org> References: <20180206165626.37692-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. Cc: Doug Anderson 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 --- 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 b774365f3635..2619b24d7e3b 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1808,23 +1808,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,