From patchwork Wed Feb 7 17:23:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10205707 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 32E3F602D8 for ; Wed, 7 Feb 2018 17:24:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2375F28F86 for ; Wed, 7 Feb 2018 17:24:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16D0B28F89; Wed, 7 Feb 2018 17:24:45 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 B8D3228F86 for ; Wed, 7 Feb 2018 17:24:44 +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=WPi4LOU6kbXckDmPQBdumudsC2c50Nj2GLaxuNsvuXI=; b=EiQFvy4gE6jcoH YDccsV+muW5FAwRyeU8RwIF7wRCeCHf6jaxfPPas8f8C51TEf8G5ZLocW2tPfWdrpbrd7UjOwOq8w 5oCv6Xbp5I8vYynz4DvcseemQIrEAVA/h+EMSbVxXStLVuH5wJ0kNdqlpjC0nIEsmvOTbwUeCkYDZ KecQE/Ad6KnqpwlVaYgGm6N3yYCOSJr4iZh/M3Uj8IOrMWv9614PZXCKRjZwL+YIaqfyPxwArdgPU cBdJTXqJmA0AQx7gWnXDe89WCTArkpemawnaFDM9I6njsbD3D9aLpTmeCRQMn7IGax2Wb7MX26pmH zlwciaVf6hORoMeJIh4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ejTSe-0005Wu-7d; Wed, 07 Feb 2018 17:24:44 +0000 Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ejTSa-0005S2-SI for linux-rockchip@lists.infradead.org; Wed, 07 Feb 2018 17:24:42 +0000 Received: by mail-yw0-x242.google.com with SMTP id u21so586998ywc.2 for ; Wed, 07 Feb 2018 09:24:30 -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=S5uYTr2T6kFQbt9u2WzVZSOysmDJpbPjKWE0aFx8ERY=; b=DVL/NgaXTwXtC54wgHUTPTS+essHc1WwbFFFQ2k5jb4AAvaiR05eqVWyv2sk6hikbY vMqHfoYOYMQSmBXd+xuE3uQ4XQSeQvqxuIbpBe9YOOTJmK5QVHyLFmas2RvSbPxpQQt/ VVDOehK4Py5YSu7NMdcvmrISChB8EkBACUR1E= 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=S5uYTr2T6kFQbt9u2WzVZSOysmDJpbPjKWE0aFx8ERY=; b=IO8uKaqONQ51/zWdCOznsjboBhjmobJLdEib0qCDZEvrqDbeRaEjLCLdtTgIvzmmII wkNqhjEzBzI8g9c6Weeiu8mslRTgSUAGCra4bh7y4s4RCR8Lp03Op8KjCWLMZIMeP0fU XltedvFAtq9FACnHvG1aXbEl+tNsNBhB4QmEWyIyHCtpdM6vJ+y4SmVCFpIekU+M/Svu RJ9MB8zNp3hjcSCIzSGwfVIBbLR5r8fBenDbjjuo76b2jCbTKy3202LXgRlgaddIzpF1 V2APRrveNn6MhX8mRNiImtPg5/enyv97IKtjUOpIXMrSU8cjepnI1GMXp/Y1Gr++1IYZ I6Ig== X-Gm-Message-State: APf1xPCnz7jH+tYLw/oR1/NIrdv9N21CbY5xzD+/yi5pv44KZ+lfU8h2 MG/Op2lbjLNpGd1FYTdT4YDhrw== X-Google-Smtp-Source: AH8x224mQE7x0yvQYPGnOanrXOxNvzxY+VKi7AgjxlLk5Zwc8Yd3l4zqpBZ0t3uaqKqxbNXzkBnxWQ== X-Received: by 10.37.25.136 with SMTP id 130mr4470502ybz.414.1518024269566; Wed, 07 Feb 2018 09:24:29 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:d3af:69ac:1964:28e8]) by smtp.gmail.com with ESMTPSA id q9sm656314ywq.29.2018.02.07.09.24.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 09:24:29 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v2 4/5] drm/panel: simple: Use display_timing for lq123p1jx31 Date: Wed, 7 Feb 2018 12:23:58 -0500 Message-Id: <20180207172404.107358-5-seanpaul@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180207172404.107358-1-seanpaul@chromium.org> References: <20180207172404.107358-1-seanpaul@chromium.org> MIME-Version: 1.0 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: Thierry Reding , Heiko Stuebner , Jeffy Chen , Doug Anderson , Eric Anholt , Rob Herring , Sean Paul , =?UTF-8?q?St=C3=A9phane=20Marchesin?= 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 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 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 --- 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 c1635b35f97e..0de176a6a041 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1816,23 +1816,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,