From patchwork Fri Oct 26 11:13:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10657233 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 E744414BD for ; Fri, 26 Oct 2018 11:13:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D477A2B1EB for ; Fri, 26 Oct 2018 11:13:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C848B2B206; Fri, 26 Oct 2018 11:13:44 +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 64EAF2B1EB for ; Fri, 26 Oct 2018 11:13:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC3EC6E45F; Fri, 26 Oct 2018 11:13:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0E2C86E45A for ; Fri, 26 Oct 2018 11:13:41 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id p11-v6so620732lfc.6 for ; Fri, 26 Oct 2018 04:13:40 -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; bh=RJ3yo/RMIdwLuBI6RrsTtQkvBOkZFleB+0wBofcBCpc=; b=rCUKUcNKvkaEa/85ozZKN+BKHETQlzEly7z0s/H+u3SIap5Kj7MKI4FqbaYjYYNAcV wr47tLtNJT3BEjnbrWG2nm2vodZVEEXSm2T2yCx4Ycvpm8if606F/jC/9Dkcep120r1X hcsEY35/1X2TCuaD7YEbaVkmjz3ABAsct01hLkURJytgZAxJZDGlUz51W0VN/Kem9wp1 9Rdme5CBuZ3HxaRfgG7w+GBE/U6PWCxrH4mEzx+m0zQ1p8Z8mXFM+xHwxZkm6grnwB+S NlZLPoBQboX4aAznhURNe/KXmxbEExPSUMxPuR6LpxohA2nQJ+mSSW5R6A+oU0B66xML w1/A== X-Gm-Message-State: AGRZ1gJa4Ura6HXApHDipS6a2CeBtFtroaj2l8M5jW/GgppxPhAEfjqV 3RlUxGKoMeCCY/T3B2q9seHTTBczexlWLA== X-Google-Smtp-Source: AJdET5d5+ExBx2NhBokQmyaWYslkF+WxngGGezGoydL42RzgvA9wd/dwgfHtKhtu1sLdoBaQSOFmTA== X-Received: by 2002:a19:7306:: with SMTP id o6mr1891804lfc.136.1540552419430; Fri, 26 Oct 2018 04:13:39 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id u27-v6sm415150lfc.36.2018.10.26.04.13.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 04:13:37 -0700 (PDT) From: Linus Walleij To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH v2] drm/panel: Add simple panel mode for the ARM RTSM Date: Fri, 26 Oct 2018 13:13:34 +0200 Message-Id: <20181026111334.3365-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.2 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: Robin Murphy , Lorenzo Pieralisi , Mali DP Maintainers , Sudeep Holla MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Having failed any attempts at a more generic solution, I fall back to the very specific solution: define a simple panel for the ARM RTSM emulated platforms. I am doing this so we can convert all old users from the previous fbdev driver to the PL111 DRM driver. This works fine as far as I can test, provided the device tree for RTSM AEMv8 is augmented accordingly. Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Mali DP Maintainers Cc: Robin Murphy Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Change compatible to simply "arm,rtsm-display" as there are several of these RTSMs - Collect Liviu's review tag --- drivers/gpu/drm/panel/panel-simple.c | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 97964f7f2ace..cd4e741b94e8 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -2323,6 +2323,33 @@ static const struct panel_desc winstar_wf35ltiacd = { .bus_format = MEDIA_BUS_FMT_RGB888_1X24, }; +static const struct drm_display_mode arm_rtsm_mode[] = { + { + .clock = 65000, + .hdisplay = 1024, + .hsync_start = 1024 + 24, + .hsync_end = 1024 + 24 + 136, + .htotal = 1024 + 24 + 136 + 160, + .vdisplay = 768, + .vsync_start = 768 + 3, + .vsync_end = 768 + 3 + 6, + .vtotal = 768 + 3 + 6 + 29, + .vrefresh = 60, + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, + }, +}; + +static const struct panel_desc arm_rtsm = { + .modes = arm_rtsm_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 400, + .height = 300, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24, +}; + static const struct of_device_id platform_of_match[] = { { .compatible = "ampire,am-480272h3tmqw-t01h", @@ -2330,6 +2357,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "ampire,am800480r3tmqwa1h", .data = &ire_am800480r3tmqwa1h, + }, { + .compatible = "arm,rtsm-display", + .data = &arm_rtsm, }, { .compatible = "auo,b101aw03", .data = &auo_b101aw03,