From patchwork Thu Oct 18 12:27:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10647083 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 C921F109C for ; Thu, 18 Oct 2018 12:27:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8EE5285AA for ; Thu, 18 Oct 2018 12:27:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB1C2285DA; Thu, 18 Oct 2018 12:27:53 +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 4D27B285AA for ; Thu, 18 Oct 2018 12:27:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 70B876E081; Thu, 18 Oct 2018 12:27:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5A1346E081 for ; Thu, 18 Oct 2018 12:27:49 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id v7-v6so27526486ljg.5 for ; Thu, 18 Oct 2018 05:27:49 -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=K8W/vSVCAaZExF9YXvdrax5iU0/wLBD/QRNVDJjeyBo=; b=ixGqObb/q7TrSpTpoCqy6g1C3sVMFCIO312LCLfg+J3y1PS5GiJ/j63JJ5+aeKwV+1 nFL9fqhWhYpgP4RnW8u0ut9wDXuyCBaOZVAVIudpA24FwAT+ZA4v2z4v6tY9N2PPBNWU aCDi1dLGMNUekhqjIYZ9VkjKuOSyaCbCFQ3ssVMweD0/Klby07MxDfKHwLp+3UgD8qJT ODbdchGT8IPNTisHZ1vQ3Gy/fymRhi0tuKJNeA9DMf/3o77LRxUuUykcN/si+Wm6xy7x k8Vk3VmebWH/UFxcdb6pQ+l6Se7m5w9nxvRsckXtQkNsKsaEz7WxH1hRZGMgCCMH1I5q eJrg== X-Gm-Message-State: ABuFfoj6Q4lEq724HRxQ6aUtIAgdUfHd2mXQkhkDjdBUD1F3hw+Sz3IC 84kYn6hnvl7Xed3B92viv3AlBQ== X-Google-Smtp-Source: ACcGV62f0QbmYOAmuu6/5QjRv7oeqzY0Ks4nZXfJP50dNmDpl8mUyD/1beP/CJ3LxpyrqgRJqdr37g== X-Received: by 2002:a2e:458b:: with SMTP id s133-v6mr21416025lja.60.1539865667696; Thu, 18 Oct 2018 05:27:47 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m18-v6sm4476224lfm.44.2018.10.18.05.27.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 05:27:46 -0700 (PDT) From: Linus Walleij To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH] drm/panel: Add simple panel mode for the ARM RTSMv8 Date: Thu, 18 Oct 2018 14:27:42 +0200 Message-Id: <20181018122742.28896-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: Lorenzo Pieralisi , Liviu Dudau , Mali DP Maintainers , Sudeep Holla , Robin Murphy 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 RTSMv8 emulated platform. 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 RTSMv8 is augmented accordingly. Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Robin Murphy Signed-off-by: Linus Walleij --- 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..b36fb1db16fb 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_rtsmv8_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_rtsmv8 = { + .modes = arm_rtsmv8_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,rtsmv8-display", + .data = &arm_rtsmv8, }, { .compatible = "auo,b101aw03", .data = &auo_b101aw03,