Message ID | 20230607063139.621351-7-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBCQ4XFG47UFRBXGIQCSAMGQEA2VEHRI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A6F403F080 for <linux-amarula@patchwork.amarulasolutions.com>; Wed, 7 Jun 2023 08:31:56 +0200 (CEST) Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-30c2e9541b9sf3794860f8f.0 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 06 Jun 2023 23:31:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686119516; cv=pass; d=google.com; s=arc-20160816; b=ntG/hzuPF6iNQH00tiMlam0u9vF+2JRIrU96N3HTlRtF07n/CFO7A+CtuoxoEo//LF Ams2+56YcGUBH1agmtHWjMCddKZ7qjtNa1LXkuV40ghd5itX215nAtHYBY/z93y1SEJ0 Kx7ghMrhyzQSeqe8WGiq9mC+SEHF9IJiCKLmdK9UeupLmmU1bPJAtJ2RqIQQZRGNf+TJ U/S6SoxEIWf7/ybaF2AaCdBtXM2ODOpqBZwHvlFIYUmTI8thynT9C8h1AE5s/S0xBv+S i4vOIrvumxXMOZGZ4CtNSnb6J2fRFdgQeYqyaD1MlNa6psTq1J66XMlt/8bMXBHE8L5r mNpw== 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=s8W6CNVu79yL5t4X7dNs+fbMEmfi/XsdVid7ZmDA7S6/No4Z06UPAdASDCc4jxfYty WE/TzDCTp3hya/RWCquTOv2yHCNvuI2xP1p7EvKOc3vWUGHqbKuEEoRICqze8rWzvO0h FFFDF3e73ftfnqKqkBU2l4dztKAocWM+UJxpEcYkQ2Secawu4iaimaoW4DZdjSDtEWOO DZdpjcLFjLFyBedKfJzPpcJ9diGPbbCjXYQiz2mZFQBnl7edJKVkK3GDqBb+iPFRVxmv EWG3fH7uXgxvG7bsswBXXd49hypfuhcZQWslL1yEMlWt43+2izRBmVx8LM7kXWSGYVQ5 3xSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oij5WgWk; 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=1686119516; x=1688711516; 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=JZACrM//fwwIA0dhrGvpD+rjPxSYU2sqeEigIemXjFPoVbhQcprEEy1oEG1yax5Xv7 aj4xpAkp2YKPqRIcHNKC4R4gnZ2VwGul2sqlhZKICuxNPMZxUAxETW5nzVUSSClsW3eI MzJl1BhzAoFVNnm42OQlXuiYfjb6azQq6SvUU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686119516; x=1688711516; 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=EWDprS0j9kEJNFVOakRFK4rCfcj6E1mCXM06+4KzwZ9FtqFOP2Cn1DdppRCkmCMddi o41NCk7UZG/Plk7RpZP21A9TOV5us86P4ivUbTe0ckYCeCm96iXQGvAE2SeObU1jA+dB mj7J+BLad6RI2iSQhvEgdVA+yuIUDpJ78lDFJpiFHjQNx+nTv6tlDIZ3a9ZKMdFscRKH g8XrJe0HG7a5DochKEjHSFwfhz8hHO4DSbxOoPG5lDlwTSGSSrr4ZQ+2I2mcMXRXbccu JImKFS4QK5dB/7ksKtLTkHBCJftr0j3kx8Ah7FAGT6kLpm7b5jLSvMli/3M62fVPivJu G+mw== X-Gm-Message-State: AC+VfDxm0k9YpjItXcIB3cW01dbDuxmzENMsB7fUpaRi3Sd+jrFw+Ydh 3Uggobuc5ypJ+r7wBiYtaWBfhsgA X-Google-Smtp-Source: ACHHUZ7boJ0o3KgofN7j4hNo6ZTll/RmjCYvsdb0lmXyVS2XEKhYA6ilMVs2Dl5BAqj+vZ3miNMuug== X-Received: by 2002:a5d:4dc1:0:b0:30e:3d9a:9955 with SMTP id f1-20020a5d4dc1000000b0030e3d9a9955mr3447297wru.52.1686119516436; Tue, 06 Jun 2023 23:31:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6000:38e:b0:30b:3044:3bee with SMTP id u14-20020a056000038e00b0030b30443beels339709wrf.0.-pod-prod-07-eu; Tue, 06 Jun 2023 23:31:55 -0700 (PDT) X-Received: by 2002:a05:6000:10c:b0:30e:4017:370b with SMTP id o12-20020a056000010c00b0030e4017370bmr3383220wrx.60.1686119514856; Tue, 06 Jun 2023 23:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686119514; cv=none; d=google.com; s=arc-20160816; b=WFssmdn5fr/fYh10sZd/qUUwmNWnOlNc8GR1eyM2vBbWG3rCXpzeIbiI5zoH+ZI0be NvYoevb+AGx4zcd0bLABKG9qiDlMs4xxNzrvCCMKtT+bPsFKNOgCNLtFrXmm8ssr4gMZ b100CY++rrU2QBTOTTMxkedVSBHWbF/gY16HHMblLfbzWxcHTLs8df2qnQoJ0vH/b4ut LqeR1L/YcuIWzrvBrPbMFYmIOnztzzvBuTlNcAPaZHtqi2UmDTqG0pNePu96JJ4FZoBe R1dmh7/mFycelwaN3FMrvm+acUfmfaFvEwF5WPgELzBV6sy70HZjM8QZt78+5WtiwwMQ r2FQ== 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=BflWY7OKCYpbuLV3OCM6IIXZvNVsBEg50UlXR4RxJMb3Xp3fPCsTMcCs5HQ7VHUKXb pILXvf99a68r4hY0dCYHmnGqPxEpTVtPE412E6qApYFVwz8hZM7qahxspF0v4sEujtwZ DUemJHFjnFaZ/y0GtT6sYX9c1Ex2ujLdT6Bt+iNAQxrrF7j/XSNqjwz/XcrD5KYW24YV aeAa95v5QaQ/BfyPoiO8Cy4f72/ti7shnd4kb/biZrqmUH1MzVt5HFJMsy1qUMcRZtWn XePVvIMSY3n0zJFnfnHzrEWbxRxIGk5c7YAtVn6mVSsEvZThoOKG4i6vwghBAWshBx0/ S8gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oij5WgWk; 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 l15-20020a056000022f00b00307cd38d9b5sor4396276wrz.9.2023.06.06.23.31.54 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 06 Jun 2023 23:31:54 -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:a5d:420e:0:b0:306:3b78:fe33 with SMTP id n14-20020a5d420e000000b003063b78fe33mr3151485wrq.32.1686119514598; Tue, 06 Jun 2023 23:31:54 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.114.163]) by smtp.gmail.com with ESMTPSA id m6-20020adff386000000b0030630120e56sm14385127wro.57.2023.06.06.23.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 23:31:54 -0700 (PDT) From: Dario Binacchi <dario.binacchi@amarulasolutions.com> To: linux-kernel@vger.kernel.org Cc: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Philippe Cornu <philippe.cornu@foss.st.com>, Amarula patchwork <linux-amarula@amarulasolutions.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, michael@amarulasolutions.com, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue <alexandre.torgue@foss.st.com>, Dario Binacchi <dario.binacchi@amarulasolutions.com>, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Yannick Fertre <yannick.fertre@foss.st.com> Subject: [RESEND PATCH v2 6/6] drm/stm: add an option to change FB bpp Date: Wed, 7 Jun 2023 08:31:39 +0200 Message-Id: <20230607063139.621351-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230607063139.621351-1-dario.binacchi@amarulasolutions.com> References: <20230607063139.621351-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=oij5WgWk; 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(-)