Message ID | 20230601170320.2845218-7-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBCQ4XFG47UFRB7E64ORQMGQEQZECNSA@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B31A13F076 for <linux-amarula@patchwork.amarulasolutions.com>; Thu, 1 Jun 2023 19:03:56 +0200 (CEST) Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-4f60dd5ab21sf29843e87.3 for <linux-amarula@patchwork.amarulasolutions.com>; Thu, 01 Jun 2023 10:03:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685639036; cv=pass; d=google.com; s=arc-20160816; b=jmOxksRw+O5xKGSTYAar+Xq/SF2AI9h1qRGytWRSI9It6C41izjiIWa/5GGEJphh+H saspOedxv4LxHFYZeHkNz3CX1C53MyHzUbbicrfZUy9ZkvObhm6gclaYMcasnQMz1PIm gryV39UIY5v6TcR8D9zLYT9EdLqrOXOnQl8B8CqpMjnJkf8zYD4nBvFsKb5FA8QAk6mk x/vyTmgbo/u8T31oFjEfw3QUyOAi1r/f8hGHN8Ritjz8qsGNc4ItQtq0JmE3PofL45Kn RXqgcG96wbpZKty7BOJ6FknskN81RwCLgGIR6skTWyPp5dmI+5esFzqipD9pemXz6p+q tUDw== 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=9myp3d2o+mlvwOWGi23yRhEt80v1tb//aBNjBvkL6wE=; b=0oZJEAk69dZai0AUQLEDH9M5lUCeC4sDdTLkCYEpGQhU1qUc7PnBGLPPmSFsJXLkNo tI0W2P8V6y1Yk5wZReMkjOMDWzaNCn3MeL+i4pnU2ozPOShWbmFyGKxBHKjyZHAfINoQ 8/XAKbZVaaL+erm/MrzrglSa1lEVFil4F7Gl+WsagtxT4A+hHUu+MSn9CFNSy6/RL/yU YjYQ1iUB5J24u967RdHpNBJtUOiVX/XNLtG3BcOiL6WOUyomPmJ6ML4/CzkiC8C/o2s2 3RE58ZQ0iDWBfqkLT+GGO4FejcCsYeCFT6ivXBzwo5t8hv67Bnl7idk4AmFenh2RxMIs O3ig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RXpREj32; 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=1685639036; x=1688231036; 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=9myp3d2o+mlvwOWGi23yRhEt80v1tb//aBNjBvkL6wE=; b=WFvdvJcEExqoHyrbB6/2glmdC0ToHO/pyeSaTqiHXlDxtlO/yG6o35q8i43VG783pF RSEwCEE5E8oJIKYCye3aeH00hKquAc1H1JrvsTmoXZzZVUdZefoKt4QAzgU4KXDuXkY+ yZ12dBojufdNyheKq2h9tweu21uGKr3qY8qXM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685639036; x=1688231036; 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=9myp3d2o+mlvwOWGi23yRhEt80v1tb//aBNjBvkL6wE=; b=Kthv00ntEywAShx8/zDcYQFDazRUkDIBLzqboJV+nOzk6pcd2XSZUb60S1h+7t0olq D6MejIn6gPnko+QqDxwr91t3TqqP9Cjq3yInqnMt/qB3xMKEnfRemYHB0Q00j504jPft xLeyIf/Y/p8r03HoZHxQ3f80cwb7ekB4GH39SUzzm0+VI0ESy6tLdLTt2FMPboIiiTKL uGbqaiTVU7Zx5h/pGohsg71O+4j2qwfb1qRwi8u9+H3sbiXnJKT52fyDoYsu/eTR1R8q ENxG97jjqK4WNmUKZowXBF/TIoi7+5DM9CbPtkshZpI8gcik2xIf5YeaG+wUoPRDxbRZ h5VQ== X-Gm-Message-State: AC+VfDxksx3+N2uff1GC5eCqrv/JjweFdS7JsOsEvJaXdiyALjMIyuDc sygUMCGGSvY8Ml0YfJEY5JtqbVGH X-Google-Smtp-Source: ACHHUZ7Z3NZxA71ZnYJ/ZqmfvtgtczfIYW9fIsqSJ9y5vJyeI1WRBrYWlVVsX3Fy5KwxPKbbnvIv/A== X-Received: by 2002:ac2:4558:0:b0:4f4:d9da:2c1d with SMTP id j24-20020ac24558000000b004f4d9da2c1dmr386490lfm.22.1685639036191; Thu, 01 Jun 2023 10:03:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:c74c:0:b0:513:f87a:ef6 with SMTP id c12-20020aa7c74c000000b00513f87a0ef6ls570970eds.0.-pod-prod-06-eu; Thu, 01 Jun 2023 10:03:55 -0700 (PDT) X-Received: by 2002:a17:907:3e1d:b0:961:2956:2ed9 with SMTP id hp29-20020a1709073e1d00b0096129562ed9mr9249812ejc.25.1685639034585; Thu, 01 Jun 2023 10:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685639034; cv=none; d=google.com; s=arc-20160816; b=vCpGBRfEDP80KZRcPApAe+QdG5BZCLzj2z0UcYpCk06m8T71/hFmLJi12RahHdfKbu rXPXQdFO0nlRUemxLo9t276c0LadgMNEFi59JkSjrf2YGrMuek8ulTx0us+8+QxjGYHc AVNXhdqOVNndQMVIzO/QhPxdhCbKVKpwq5EF2uYg0qikom7Z32rFoNAt3Xxfq8MV7bGS +pKtDpdxHpKmpB2oZKzn7NHvGPi8kjic+a7nU7yDZm2hD4dtKIIo2d7lDK6K4vjPwtaP nfP+v/GOXPqPZ53MeMNzaodvVaBC2gQ+6TXP4hG+SNagVNPHlR0CDnz2lOnuL7DshjdJ Dshw== 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=Ftjev7ny28lvJRfWKN2KXX1gaG/LDneackQ782m2++c=; b=xP5Zb3jHrbtxfHz3+nyvMjoGapJQXxSrhbN6fFxrsGKSXxzhMaf1vRceUxDzjD+1TY +lKnl/HKHj8qK0gr7YBzhuMQnT3PJP6Uuy5Uy++rbBO1U6Sb5cyAplIFAD8b+NkMH7nQ mwazQeCevaiGKiVoJj5C5LfVdM7knaNZEbZ2Qcmw2MBt5UWqw83ZHBsg0NtpRakLGsZw gdw8wfwUpLO6VFWhb1DDo0gZM1RoWh9FMVa9hHwJBQnvpMZ6p5yBHFzf7/qZRcMHEsO5 Ia4rbLFjxyMZS5iG4HvAKi1vLWSKazNw1hUj/4ugwIR1KhmyXFbD68FALALkwS47zT1s Ct1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RXpREj32; 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 eu19-20020a170907299300b0096fad3bb65bsor3413358ejc.2.2023.06.01.10.03.54 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Thu, 01 Jun 2023 10:03: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:a17:907:da3:b0:973:d2b6:f536 with SMTP id go35-20020a1709070da300b00973d2b6f536mr9135641ejc.21.1685639034375; Thu, 01 Jun 2023 10:03:54 -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 bh25-20020a170906a0d900b0096165b2703asm10658522ejb.110.2023.06.01.10.03.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 10:03:54 -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 6/6] drm/stm: add an option to change FB bpp Date: Thu, 1 Jun 2023 19:03:20 +0200 Message-Id: <20230601170320.2845218-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230601170320.2845218-1-dario.binacchi@amarulasolutions.com> References: <20230601170320.2845218-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=RXpREj32; 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> --- drivers/gpu/drm/stm/drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)