Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp768329ybt; Wed, 1 Jul 2020 09:30:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDmBGaBUs0sNZoCUMj817iSxoAHXVQstRs3FMMY5/BaHhuzug050wA6KTY1MkY3KOVLwlI X-Received: by 2002:a17:906:c056:: with SMTP id bm22mr14325818ejb.444.1593621046349; Wed, 01 Jul 2020 09:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593621046; cv=none; d=google.com; s=arc-20160816; b=w7EPVIskoXfR1Rba1qsWEwnfKY3Hc0hbaEtRrx80PUhn662rth9KiT/HEctCkrH7Bv 5T5HMs6WB9M3y1QalzpRRyuqf8oHKbfitR6vyuTg2ArqW04RwpEZfnv+Apn3h5tcdJaE 2J8TaSXT8ymmMiA3+KgY9OA6MLMzhdu/RF7lD6vQqmUH7msc20YyOgPyKxyw76YJUGDD xkgHqnw4WVWwAHJxfmNoVLuccvIx+twQPDTS9GpO4rTmhcTkDSWYuQbagZJUfAMORVLh dLdtLl/pu4vpWCE3sy1yiOn2LSrFDrV51t/dc+EvOVaKwsi2V1lWLtExrtIYvnSEEUC/ bkjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k984tfwUfphSqf/FZcJlR4oR3/VOdOos21jOwlpPCRw=; b=smT44DwezzcuPxNORZdtdpUmeE14KsQhEbaff8PrKW/KI4r10YiE5AV7O9UDKmMQKL O+ysPiJPfaod3W9QJsKHgjEtr3+HgE6wq5Nxb59ulEUy7SAAeuWGwOVIMvvg5C3foykI yqSSrGsXWJotm6ybagIRUSlev8W+1j7uGkbyTsNXqsWhXuIW2VnHcRL2BRI75SCB6PWm RnoH2o1VD4z/lNGMQIsHR9O3oMDbrYy+6LP3iizG4liMTTDB+q7d0yLCVSZt4543vBJw 7tv3OOdX3wVK8nK3KQ6470S97/CzWPHSR83jnUQdnRGR0AqXJLVk+OIq9FqMaz2064cx n3Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=ZCsUdMBr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si4339819edq.546.2020.07.01.09.30.23; Wed, 01 Jul 2020 09:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=ZCsUdMBr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732427AbgGAQ3l (ORCPT + 99 others); Wed, 1 Jul 2020 12:29:41 -0400 Received: from vps.xff.cz ([195.181.215.36]:52350 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731672AbgGAQ3h (ORCPT ); Wed, 1 Jul 2020 12:29:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593620973; bh=f/45zyltLN8VLr22IqV4zw/zoKLTG0OhDbBg5rPU60M=; h=From:To:Cc:Subject:Date:References:From; b=ZCsUdMBrHvyN1u7y6/gMpCnpn10Fo3OZF4oXwP0C1w1Hp7W7+qFKGnoXKZCZfjLRx PWMeiaramolWYcBpTAlgpM3uTZFON1/FtmgCa9sQeNFSEEVtpj3b2zzruCssZ6jbma Bik0JwiKKxwdU0u5pN5SIlAZqwuVp/xBCzj+Pvcw= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , =?UTF-8?q?Guido=20G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Cc: Ondrej Jirman , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Samuel Holland , Martijn Braam , Luca Weiss , Bhushan Shah Subject: [PATCH v7 07/13] drm/panel: st7703: Move code specific to jh057n closer together Date: Wed, 1 Jul 2020 18:29:22 +0200 Message-Id: <20200701162928.1638874-8-megous@megous.com> In-Reply-To: <20200701162928.1638874-1-megous@megous.com> References: <20200701162928.1638874-1-megous@megous.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's better than having it spread around the driver. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index 4721132ad3b1..61872f623fff 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -153,6 +153,30 @@ static int jh057n_init_sequence(struct st7703 *ctx) return 0; } +static const struct drm_display_mode jh057n00900_mode = { + .hdisplay = 720, + .hsync_start = 720 + 90, + .hsync_end = 720 + 90 + 20, + .htotal = 720 + 90 + 20 + 20, + .vdisplay = 1440, + .vsync_start = 1440 + 20, + .vsync_end = 1440 + 20 + 4, + .vtotal = 1440 + 20 + 4 + 12, + .clock = 75276, + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, + .width_mm = 65, + .height_mm = 130, +}; + +struct st7703_panel_desc jh057n00900_panel_desc = { + .mode = &jh057n00900_mode, + .lanes = 4, + .mode_flags = MIPI_DSI_MODE_VIDEO | + MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, + .format = MIPI_DSI_FMT_RGB888, + .init_sequence = jh057n_init_sequence, +}; + static int st7703_enable(struct drm_panel *panel) { struct st7703 *ctx = panel_to_st7703(panel); @@ -226,30 +250,6 @@ static int st7703_prepare(struct drm_panel *panel) return ret; } -static const struct drm_display_mode jh057n00900_mode = { - .hdisplay = 720, - .hsync_start = 720 + 90, - .hsync_end = 720 + 90 + 20, - .htotal = 720 + 90 + 20 + 20, - .vdisplay = 1440, - .vsync_start = 1440 + 20, - .vsync_end = 1440 + 20 + 4, - .vtotal = 1440 + 20 + 4 + 12, - .clock = 75276, - .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, - .width_mm = 65, - .height_mm = 130, -}; - -struct st7703_panel_desc jh057n00900_panel_desc = { - .mode = &jh057n00900_mode, - .lanes = 4, - .mode_flags = MIPI_DSI_MODE_VIDEO | - MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, - .format = MIPI_DSI_FMT_RGB888, - .init_sequence = jh057n_init_sequence, -}; - static int st7703_get_modes(struct drm_panel *panel, struct drm_connector *connector) { -- 2.27.0