From patchwork Fri Mar 2 09:09:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 130494 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1049729lja; Fri, 2 Mar 2018 01:10:37 -0800 (PST) X-Google-Smtp-Source: AG47ELvWtmHG+DeDfi4yrmi4uuYRlnnRCGsd2CrdoZ5Ed9idiN15M295qncLnr+gsJmbquh4i8iN X-Received: by 10.101.71.202 with SMTP id f10mr3943153pgs.91.1519981837395; Fri, 02 Mar 2018 01:10:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519981837; cv=none; d=google.com; s=arc-20160816; b=uMg+edpc9KmLvJjPZCyL8ivubAE4jQ+Th77yA/byIO/FoyoboLQL0QqugrY8dc8yhE 1ouZTmkM2WmD1ibzWkWygLurJBJ1LdhclLoE84AVk3Y9+VLXQ6H45f0Vo+EHmIxHZZCS PSyZlpfCNcu8NnX5FZdwqCuF4qeSNqRQLjFxu5e12y3VhJ9Z0LdXx4Ga2su4XR/SHOiu q4kHzxR4e/R261jhVpAR4QpHzqt93g+i4AbMYMc73t5tMpUqDuJA//0xcZ11Z2esKkCa UWMgOAFzPhc3rVQ1+hb0Y5R7vEm+RcXbh+38rFGTsYOqxL/CSifSABCxQVPiDhDiFWyJ 6jlQ== 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:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=58eSIizEbTPCgAywuqFjgmwcXFFg2l0DJIgazaVpICg=; b=OQiu7YV/jtqNO7Z3j/DghDaaoMF9hBGH1zwTT4KaatE5T3lZFlUfIm0DpfTNvsqhiE bn/3zqejRA08FV2J3UgSe0gEb5SfwSl7HliLDN6WR9+Y4p2/i3TH6/WQ+LDP1bCveRJc mAEd9N20w5c48rI5b8bA3GlbWeaZz11FhhqLxhqGsyAxswvh8c5a11Ol4hFOFEOYA3UX iha6tUHEcTIQUIUlfFMnHjF8HJYMraHVd77oPWBGOPhxipt4URP+fZ2SLrzfuT7ze3Gk rZgPV5ahdpdj1jg4811QZcgVJ/Zopa5s7Vdv2UBW3+oqT61E1BEq1wVHHnVzA2mHTdp2 LfiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HduWYQr0; 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 b9si3734379pgn.443.2018.03.02.01.10.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Mar 2018 01:10:37 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HduWYQr0; 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 500A36EE2B; Fri, 2 Mar 2018 09:10:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 39CCC6EE3D for ; Fri, 2 Mar 2018 09:10:02 +0000 (UTC) Received: by mail-lf0-x244.google.com with SMTP id r80so12306166lfe.13 for ; Fri, 02 Mar 2018 01:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SX3+n951lztIyX7CAOQq03/c0G9f0HcWHv0IM4FGvRQ=; b=HduWYQr03C5JIHRT50TtpZBj99fRbzJ9EeO9LYvC4++W01nkPgJp71LnrAH5Ne+wda eVv4CQsAgmNrWlDA0LesVzgKZ2FqIQHO92A+0kkr/W2S52HKt9AaDKerVHf6j2liRV/g PxfG1uLurm4evf//gOCD5msOdjxHZGrOCNcTw= 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:in-reply-to :references; bh=SX3+n951lztIyX7CAOQq03/c0G9f0HcWHv0IM4FGvRQ=; b=LAVj/3iXh4UlFQnOeaAeQtKRiLwwb5hEDqgYn4BUBwrkhaZB6o3Fxc4iLYIq6EgQEJ TInm62/swIdiXs/L63ritEzEiypjJjAd0MosIJQRPHNtuMIVUNPcq61Hw3Styrazdcf8 h7UXAgsLwpxcr/0XgXWYHLjOVPNB/iQo94lOCRdIWPEWxcsUmWF2eF7JYDvO9JadKl2V 5/C2VkhtOjiqf69Gs50SsyytYe/q+VeyzCDTht+5HHNs4NIJ/FWRrYj6shHb5kDSKdc9 ZLyiCtlR52DlWduUe5IAzDuJD2kHeBQLQExftMApfGejTXyS/HKhrUtVyuepR6bEfVxK kIAw== X-Gm-Message-State: AElRT7FWTiyzha984/cAh4VUIvqCXLdeuzzC6cxCTllLF9bijiAtJgRd vCrBcMduhOzhKkW5Jd3VLlw3Kw== X-Received: by 10.46.87.72 with SMTP id r8mr3507658ljd.93.1519981800587; Fri, 02 Mar 2018 01:10:00 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id c63sm1242729lfg.82.2018.03.02.01.09.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Mar 2018 01:09:59 -0800 (PST) From: Linus Walleij To: Daniel Vetter , Jani Nikula , Sean Paul , Eric Anholt , Liviu Dudau Subject: [PATCH 3/4] drm/pl111: Handle the RealView variant separately Date: Fri, 2 Mar 2018 10:09:47 +0100 Message-Id: <20180302090948.6399-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180302090948.6399-1-linus.walleij@linaro.org> References: <20180302090948.6399-1-linus.walleij@linaro.org> 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: linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We want to cut down the default bpp to 16 on the RealView so we can have a 1024x768 framebuffer console by default. The memory bandwidth limitations makes this not work with the PL111 default of 32bpp. This builds on top of the earlier patches making the framebuffer default bpp a per-variant variable. Signed-off-by: Linus Walleij Reviewed-by: Eric Anholt --- drivers/gpu/drm/pl111/pl111_versatile.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/gpu/drm/pl111/pl111_versatile.c b/drivers/gpu/drm/pl111/pl111_versatile.c index 9825f6d52788..f15391d994b6 100644 --- a/drivers/gpu/drm/pl111/pl111_versatile.c +++ b/drivers/gpu/drm/pl111/pl111_versatile.c @@ -230,6 +230,23 @@ static const u32 pl110_versatile_pixel_formats[] = { DRM_FORMAT_XRGB1555, }; +static const u32 pl111_realview_pixel_formats[] = { + DRM_FORMAT_ABGR8888, + DRM_FORMAT_XBGR8888, + DRM_FORMAT_ARGB8888, + DRM_FORMAT_XRGB8888, + DRM_FORMAT_BGR565, + DRM_FORMAT_RGB565, + DRM_FORMAT_ABGR1555, + DRM_FORMAT_XBGR1555, + DRM_FORMAT_ARGB1555, + DRM_FORMAT_XRGB1555, + DRM_FORMAT_ABGR4444, + DRM_FORMAT_XBGR4444, + DRM_FORMAT_ARGB4444, + DRM_FORMAT_XRGB4444, +}; + /* * The Integrator variant is a PL110 with a bunch of broken, or not * yet implemented features @@ -257,6 +274,18 @@ static const struct pl111_variant_data pl110_versatile = { .fb_bpp = 16, }; +/* + * RealView PL111 variant, the only real difference from the vanilla + * PL111 is that we select 16bpp framebuffer by default to be able + * to get 1024x768 without saturating the memory bus. + */ +static const struct pl111_variant_data pl111_realview = { + .name = "PL111 RealView", + .formats = pl111_realview_pixel_formats, + .nformats = ARRAY_SIZE(pl111_realview_pixel_formats), + .fb_bpp = 16, +}; + int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv) { const struct of_device_id *clcd_id; @@ -306,6 +335,7 @@ int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv) case REALVIEW_CLCD_PBA8: case REALVIEW_CLCD_PBX: versatile_syscon_map = map; + priv->variant = &pl111_realview; priv->variant_display_enable = pl111_realview_clcd_enable; priv->variant_display_disable = pl111_realview_clcd_disable; dev_info(dev, "set up callbacks for RealView PL111\n");