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: 149121 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1907200lji; Thu, 18 Oct 2018 05:27:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV617thEK9vl4Dz1KL5hKPFkArqd6gLs4qzGO6/gmg/ijlFudTKTTmChcZuu6vxneiRVStwt2 X-Received: by 2002:a62:3942:: with SMTP id g63-v6mr31310223pfa.170.1539865672970; Thu, 18 Oct 2018 05:27:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539865672; cv=none; d=google.com; s=arc-20160816; b=wursjEhMAXKnO6YSDOCKfJzCMhvGSsqle12d+44UwED23BnlPKyHC/jPVJXfTma7/H kqA8h0mXYmRx54kG/o+5VGnlcnW4foDwnmsy7RO3+tYWlNGLavSx2IZ1rIWFgx3TBR03 218GcMFOljPbIRrJ/gsVsaXYCcnqCB+cLUNaOO0Tweei9xJuXrW1yY66w9sURdv/t4S8 FUw+D46tF+5NRLJ29f6AIhlPKrt2wRbNGyDjYxeGDhNFFu0dCU/iq0kqu0uF8IuKQbwY tflV66wecJhiKv/VzlRqmXzWRDy1B1ZYNEi1nWntNdM47DCCVB9MEBak6QxosjCcAZfn Xrzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to; bh=rwN+MOH4Y5khQ9jJ4KyRBG68eGbTFf7uLYu7aunn1mw=; b=KJutHPTiAcX830Dq4sMv9F/Ozngp+8RrgPhw3wtAXsOLDc/+VhF9k1pu80PyHWqunI c2a3eRRAPEW2fe78i3U4lGJr/Xk2A1UBV11Z+aZlWRRCeEN73pgNa1kBFQyPMnzCUFFJ k1LFvEVdzktsZV8/ZahDkhAMzhclN0qlxEs66+9Tus66CGNpJ8Hza8q4MFvQgoUT0ZiD B6IfWApEBFmwa52kF0tmlibvX2nStLTOHl92Gaz/nFrkqpGDfDmGRG2bua37meBFF8Nm OyPPQBkNZmPm2pfKJJM2cF0FP7+mbWZq24CBXbb0UIRpGAITu2S9pjFtjES2BxCKrZfy 6Tsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 35-v6si10785962pla.290.2018.10.18.05.27.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 05:27:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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" 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,