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: 149590 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp624616ljp; Fri, 26 Oct 2018 04:13:44 -0700 (PDT) X-Google-Smtp-Source: AJdET5eLjhU7Fz4HIAcW1wESg7MLClaTudrADKfy/BzA0Pq7QgdPpnSayYdoQMGZHW2uhbelG1rb X-Received: by 2002:a62:30c7:: with SMTP id w190-v6mr3201849pfw.188.1540552424116; Fri, 26 Oct 2018 04:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540552424; cv=none; d=google.com; s=arc-20160816; b=Mqk7kmlbrxFarrKod1tLmGR0b6uux+haZwFrMBTQVYRFC84xr/w91+gJYtPKPvJ1JZ zudg6VEYlCVQ10hCxuBF5AOHGJQsQ0PMyr1KnjA9FB3aYPBXvC775ZQSjGmQx0CEP7Yo ZVVpDWuRgl/QObQ1/8wwVeiLZv/StYsYo0VyudBLw4aK1qOAHPzNcYHdO3MF8BU4xPAd obZy1k4XrtBbrV9OruqhrxfCQneqi+H39Oi4HFW3SOHQki/nd7GHVEWYuaqDj3JizqaQ 1KI7c8KI4fghWpTGGr/WOlB6O0iZlEawtPZG2BeZXUeI848Me5wj/OR2gfj+YSsKcygA niWQ== 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=Rc39CIW7AUU6+WydCAjMLM5HnI92IA+tcag1yxFcIDo=; b=L/BkH/kB6qa5tjboEQ9NUE2k8/fMAoZkK+vueGYGFDabRwhskwmnN0vflDiCZazYph yZkbDBvP2DMrejfgC5/kqMyBaDokCuEgP92WF/27qSK6N0rw/JITkknw8d+ksqdBgTqo Chgu5EhHsJ+BTvQn5nJ0NZ7N3q/Kyl4moJME65HUUj1sWBBNvXBs5aB/EUP0OCEZCk2V FzCUET5V29ZtN0iEzI0gZeyEbOY064JTMgvbfOe9YSIWlD0xQ0OJ2etJyrlYmqyw6Jv0 14dpwl1Rogex5oNKnZDsZRN71znpI8wQLkzq6sbLkrh3tnxwWNort40IG2/7qk/6PhzW CZBA== 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 m8-v6si12178700pgi.18.2018.10.26.04.13.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 04:13:44 -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 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-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" 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,