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: 10253837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CD8466037D for ; Fri, 2 Mar 2018 09:10:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7F6C2880B for ; Fri, 2 Mar 2018 09:10:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACD03288D1; Fri, 2 Mar 2018 09:10:08 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 628442880B for ; Fri, 2 Mar 2018 09:10:08 +0000 (UTC) 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-Google-Smtp-Source: AG47ELtBXCimU1b7JfPD3i+AntJyWNdBXWsgyTsUM8Hdb/nwai8ffFd5hr2JkIY/PSPd/2zZEhzBGQ== 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" X-Virus-Scanned: ClamAV using ClamSMTP 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");