Message ID | 20230602102123.3345587-7-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBCQ4XFG47UFRBOEF46RQMGQEM6TWGBI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4DAF53F076 for <linux-amarula@patchwork.amarulasolutions.com>; Fri, 2 Jun 2023 12:21:45 +0200 (CEST) Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2b1b1693338sf2578961fa.3 for <linux-amarula@patchwork.amarulasolutions.com>; Fri, 02 Jun 2023 03:21:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685701304; cv=pass; d=google.com; s=arc-20160816; b=t2y9D0OQNucr2Jhf+FZCxlyaQx1/t/QnIqSGE6cpsYX1qT81FI6mf6YOUcnRHemhWw zFkZt1SrFGlo7lyEscbWNpOKiER1QPW1IfP0w68uSIPQlyO960LQ/oNrtXTy0mxXF7Hz mtXwJDdnwgtxLhyJNXL/85BPgukgk+6zBy1oE53GbL3H1dMvJJ43rf0pvXqOKT12IaKZ uFeujvf5dzqKK/M2jRPZ7XVlZn0tT2X7Y+EvebGLJY7sb+JTerrzuV8tvKY+ijevXRr5 wrP/BsLd9LR/VliFxTgHH15jASbxza5kSmH/tsU7wBPlAT1MuG6np7QTUl865aus7AxR 2iFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=D5CwRoVOt/rUcomCRDJnuziyBdyvZg3yQ5QOGne/+uk=; b=oV7M0329Vc8awLLrV3c7mrRxZCHHrt8ClZkkWJdOhavjIczgoN8mQfIkJpRzJn7YRW mNcJ4sFHjAp1aMK6wk9h9hifIjswG+HAPJHAkOBUxOWwA0rols7b431GLZXa9xcuhnVz gQ7AqFzH22As6LTg5STG1HvUbDxfKWJLoYt/rnV6kAFG0WVeEmo7tEFOLzA+gH4/MD5x BnMyiwT6ifGPxOmYM0b5knWt88YZAZSBZT5QoWC3KRpvxRv1AbqHqHAewSCTezKeqn5f ndzSs+03CRXbjGppXsneKFb1oweDNBcz2ICi22F0yPzj6ww0L1fYlc6UPr+z766fs4Y+ Xh5A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GsIwW50O; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1685701304; x=1688293304; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=D5CwRoVOt/rUcomCRDJnuziyBdyvZg3yQ5QOGne/+uk=; b=rCSowxW5GUvSUQt2igznZHHP0sJBuyWdMq73I6gpxK+dhQT6YlSqdmbWG63emp6Aey yQhzFmB+pqm61JBZ2LVFqL+O5vZrSZMbt6fzS7pOFC7FwzxHmNpLLWPIyZrXfnMud08x TYAYOkuqPV0ILvv30G86BruvryjaL3ihq1+NQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685701304; x=1688293304; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D5CwRoVOt/rUcomCRDJnuziyBdyvZg3yQ5QOGne/+uk=; b=R2fyztzRrq4eZZfQ96JUSY0x45bY5FvncLPQ+gVgDgGzdju7XtLQI812KRabgOMMut TGV7YEb8k17+gg/JM20p+mLHGhWrhHwcRTQ0nHWdy8uI6sgHN1OgpIA/pv6O35zh5gpi HBAtcclhlglGA186yz+BPMkGsZolEjLiwPRY/i22lIC83AiwdgxNp44EVtXxOFAuMq1Q Z5bV4cSFLAgbEVSkTqva3Ftl3ZRSyxe29azcJTOkRSJC6G9YYBMXMrP/3Ruk6c+job+o C0szL64EJMdKGi9ZE5rl3QT9O38i93JhseFlzp8KzD+9izXWGXsZIBO3vHMxw4QwGZRt 4qbg== X-Gm-Message-State: AC+VfDxkMBZtcsmEwCTE7w+v0JR6qvWCmsOy55YWywC2PtBuszfCN31V bx48XYA2Pu9g0+r8BFfR1hj53cq0 X-Google-Smtp-Source: ACHHUZ6xfzjXesiOrIwXcRak23oAvTscYRDviVOdXZVY8G0IDsJ+eg89W6wseLuGmZ9Kzm5lP/OXig== X-Received: by 2002:a2e:3807:0:b0:2ad:80ab:e715 with SMTP id f7-20020a2e3807000000b002ad80abe715mr1254075lja.11.1685701304762; Fri, 02 Jun 2023 03:21:44 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a2e:a593:0:b0:2ad:a1ce:ff1b with SMTP id m19-20020a2ea593000000b002ada1ceff1bls115479ljp.0.-pod-prod-02-eu; Fri, 02 Jun 2023 03:21:43 -0700 (PDT) X-Received: by 2002:a2e:330f:0:b0:2a8:adf6:b0e2 with SMTP id d15-20020a2e330f000000b002a8adf6b0e2mr1282145ljc.13.1685701303010; Fri, 02 Jun 2023 03:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685701302; cv=none; d=google.com; s=arc-20160816; b=Y2Q4o1jXlOUkFgwSBWRyt4NjJ6d5YqgkhHUyw546Lgrp/ytS60cyVA3HNIkutpn8kb Q6xNdjPOPeKEsbw5Bpcow5X3TLzuOIK1/jXDp9BHNccOmaxXbY6xLwk0dwGqKLnfBSRi mfVgnlKMJCa8ndxHB2PIeW1yPGXEhL6UtZynmKuaN/d3p61RX3tJh9sSKLjhdHCbkWAU CFfK+CEpPh4RBtL3IRVsk9A6U9GsCBUB2ZovfktiAFx/2zTtmGy39y9mJ3bjQFxveZHk 41OrS8+YRCg8As8mt/UamiXKLE49+1TGJbqOR1R2coThL9/bAUxiGW9PqE/yRCQ3jX2i 4VMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=yAW+zzizoPdH0S/aO5WCXuWp95MvJ4568t/x7rERkZ8=; b=HeSCg1RDtwt+AbLXzxII5evOWj1wvqINYjI3yvgcqFZzb8Z1Mr7SAfHThXF5757lA9 YE6hlK/wiwjDbllHYga2K28QQToj203kARrgTGvQFJ1apauWSlq3pxnS9VHaX1HNK5d7 EbxuS14Lj+e5FeDCufPu6DeeIOpsSowAw4NWR5sbY8hfI0cTquKOJLaUAxOzK5z40umr XrpBOF9i2k8vyX3upslTlyVcMy8VtFmcEARBmUmFYLbFyOhKoLK/h5SPG8O1LyvMahwA OMxGCL7lmQJdMN63bAhT11sflgzRhx42si5dYyUwA31GzoeOYzxbHYh1NqSB1ykejN4X e79w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GsIwW50O; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id b6-20020a05651c032600b002ac75e54074sor290256ljp.1.2023.06.02.03.21.42 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Fri, 02 Jun 2023 03:21:42 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a2e:9216:0:b0:2a7:7d70:6bb with SMTP id k22-20020a2e9216000000b002a77d7006bbmr1425706ljg.2.1685701302702; Fri, 02 Jun 2023 03:21:42 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-248-31-20.retail.telecomitalia.it. [95.248.31.20]) by smtp.gmail.com with ESMTPSA id x24-20020aa7d398000000b0051499320435sm528887edq.14.2023.06.02.03.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 03:21:42 -0700 (PDT) From: Dario Binacchi <dario.binacchi@amarulasolutions.com> To: linux-kernel@vger.kernel.org Cc: Amarula patchwork <linux-amarula@amarulasolutions.com>, michael@amarulasolutions.com, Dario Binacchi <dario.binacchi@amarulasolutions.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Philippe Cornu <philippe.cornu@foss.st.com>, Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>, Yannick Fertre <yannick.fertre@foss.st.com>, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v2 6/6] drm/stm: add an option to change FB bpp Date: Fri, 2 Jun 2023 12:21:22 +0200 Message-Id: <20230602102123.3345587-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230602102123.3345587-1-dario.binacchi@amarulasolutions.com> References: <20230602102123.3345587-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GsIwW50O; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 422220df7d8c..65be2b442a6a 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -30,6 +30,11 @@ #define STM_MAX_FB_WIDTH 2048 #define STM_MAX_FB_HEIGHT 2048 /* same as width to handle orientation */ +static uint stm_bpp = 16; + +MODULE_PARM_DESC(bpp, "bits-per-pixel (default: 16)"); +module_param_named(bpp, stm_bpp, uint, 0644); + static const struct drm_mode_config_funcs drv_mode_config_funcs = { .fb_create = drm_gem_fb_create, .atomic_check = drm_atomic_helper_check, @@ -93,6 +98,7 @@ static int drv_load(struct drm_device *ddev) ddev->mode_config.min_height = 0; ddev->mode_config.max_width = STM_MAX_FB_WIDTH; ddev->mode_config.max_height = STM_MAX_FB_HEIGHT; + ddev->mode_config.preferred_depth = stm_bpp; ddev->mode_config.funcs = &drv_mode_config_funcs; ddev->mode_config.normalize_zpos = true; @@ -203,7 +209,7 @@ static int stm_drm_platform_probe(struct platform_device *pdev) if (ret) goto err_put; - drm_fbdev_dma_setup(ddev, 16); + drm_fbdev_dma_setup(ddev, stm_bpp); return 0;
Boards that use the STM32F{4,7} series have limited amounts of RAM. The added parameter allows users to size, within certain limits, the memory footprint required by the framebuffer. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- (no changes since v1) drivers/gpu/drm/stm/drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)