From patchwork Fri Jun 2 10:21:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13266084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA7EDC7EE24 for ; Sat, 3 Jun 2023 07:02:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4E8B10E20C; Sat, 3 Jun 2023 07:02:51 +0000 (UTC) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9CD2910E646 for ; Fri, 2 Jun 2023 10:21:42 +0000 (UTC) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5149390b20aso2752646a12.3 for ; Fri, 02 Jun 2023 03:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1685701299; x=1688293299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+N6ncdPhuJx70XZ6yjaTOtXW/wJdhXZgpqu86CyLnmg=; b=FN+wcbGOSq0oaAGO68O3XS3iH/IcziIzYBzGbvG0X5hp7SCpf4EJJNAg1ZHmseAnew VPCMtcRQpkV5+FX+hVA0hl3xoaUG8TEfI/J/HgK+jzruhXOyLLGtoLcSSQIjLRIjohII VKnbARjYi/zDstgJJ4cvJWtQugRvzYaC5omoE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685701299; x=1688293299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+N6ncdPhuJx70XZ6yjaTOtXW/wJdhXZgpqu86CyLnmg=; b=La0/O/L+ivQ/pdgk1w2Gu5/grACAvr9YRhODhy+Xc5g/K2wPTw33pPSZjpVPtAKS5v W1tWCP+ORhLSTbIuckI0/4v0gBfcrHqyCcwVcHW2YE6v2d8RsTVYSnQObbdz2ZFB3QD3 8dJMh9BFPJBeX/Atz2r9xZJ2kXsDI7WL3CFKUa+Ib5AOLZ+AVY1thkmiW5Ma9Yizoxnj UWo4ymaesASnJWhiGEkZ4p54X4PcUYoS7EdkOvlUC9vAL6Av7qWuCc/GMMjWPkC0FEHb /zxpFNZkWSMJGcW9r0xWQElqvrM/9gARSaK3kgApDMl38r1iFoz4E+l5irpnrtLYIAaM Ft8Q== X-Gm-Message-State: AC+VfDzBuZpfWZo8YVNQdkh2JffUBu73guVqufyLfZq9SVo1qIyjmxvq Jaiohuk0JtNmTgdvTF5o5PeNJA== X-Google-Smtp-Source: ACHHUZ4cxTRC+aOD1sVygvyNLnQtq32ncqv67n9fRQJ5jpcnMNundXDEtA2HWACi2ZfzZnSq8+CJvw== X-Received: by 2002:aa7:d817:0:b0:514:9d17:d6e8 with SMTP id v23-20020aa7d817000000b005149d17d6e8mr1521068edq.26.1685701299310; Fri, 02 Jun 2023 03:21:39 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 03:21:38 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Subject: [PATCH v2 4/6] dt-bindings: display: simple: add Rocktech RK043FN48H Date: Fri, 2 Jun 2023 12:21:20 +0200 Message-Id: <20230602102123.3345587-5-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-Mailman-Approved-At: Sat, 03 Jun 2023 07:02:50 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Conor Dooley , Dario Binacchi , Krzysztof Kozlowski , Sam Ravnborg , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Conor Dooley , Rob Herring , Thierry Reding , michael@amarulasolutions.com, Amarula patchwork Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add compatible to panel-simple for Rocktech Displays Limited RK043FN48H 4.3" 480x272 LCD-TFT panel. Signed-off-by: Dario Binacchi Acked-by: Conor Dooley --- Changes in v2: - Add 'Acked-by' tag of Conor Dooley. .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml index 01560fe226dd..bd6a92d2b41c 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml @@ -280,6 +280,8 @@ properties: - rocktech,rk101ii01d-ct # Rocktech Display Ltd. RK070ER9427 800(RGB)x480 TFT LCD panel - rocktech,rk070er9427 + # Rocktech Display Ltd. RK043FN48H 4.3" 480x272 LCD-TFT panel + - rocktech,rk043fn48h # Samsung 13.3" FHD (1920x1080 pixels) eDP AMOLED panel - samsung,atna33xc20 # Samsung 12.2" (2560x1600 pixels) TFT LCD panel From patchwork Fri Jun 2 10:21:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13266085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F4F3C7EE24 for ; Sat, 3 Jun 2023 07:03:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A197210E225; Sat, 3 Jun 2023 07:02:52 +0000 (UTC) Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2488510E646 for ; Fri, 2 Jun 2023 10:21:43 +0000 (UTC) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2b1a46ad09fso21268111fa.2 for ; Fri, 02 Jun 2023 03:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1685701301; x=1688293301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QVzHDRPJNZ9IK1tuBeqT97BbWRZLa0+X8FPJl3jJUF8=; b=mMi7B8OLzoBy0XdAAy57UW6vUUYVs6mZUY0Eqj4wxd1azuZfGhxtdE7mSDOZMCdJVR IB2BbJdt79R6mNQXU43ev6H5pDzb6kBJbz06J8MyOaRw5PRn/2IQxDISZtggxt2HmCS0 YnQ66M5U89s0AEJmmT1tOXh+wO2SEOodTG4jo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685701301; x=1688293301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QVzHDRPJNZ9IK1tuBeqT97BbWRZLa0+X8FPJl3jJUF8=; b=CtX6EtVcuKuCZGw8XxGMyPm81qUJfXWviP4InWFsTmq/yPE1tammChtBNy+dA2scMg N7C5/rGDtVdyehjcIAWeETxOJ5/1CH9tSspPi96VT9oM1XDXXoYvuNlSMyA5nHl7rjwG V4PhEnnRAkHJCNTk0AwyDZq9bxszonvfvPGU78ScVHZjkDiQ07a6tNIku/zKgQljoiiI XzXLvLupXuEBbPetHsR/sXMqOz30xUEuxzEk4/+z7eWD6rEAw+Vhj6ui73OgYuJDZ2XN w0Z8igW9Y9RcOBY0mdnnE/eLEHJyejuHOKpWayWlv9yAx2Q0TlxYo3z4UMS8gbjW0hAg r35w== X-Gm-Message-State: AC+VfDztXNHFr24QjUU6gy346QZuBgBI1AFFNCgH07XMdOlT04ol+aPi GLC6CZu/6tmKmFjWBlOR59XUDA== X-Google-Smtp-Source: ACHHUZ6Ed45kcIADNWUp9NNVg26d/KpiaFAlx21eReeknhNRdp8zZ84PfjAecQZ4ZkYv7TO8lp7/GA== X-Received: by 2002:a2e:8e89:0:b0:2ac:d51f:2d60 with SMTP id z9-20020a2e8e89000000b002acd51f2d60mr1241778ljk.33.1685701301140; Fri, 02 Jun 2023 03:21:41 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 03:21:40 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Subject: [PATCH v2 5/6] drm/panel: simple: add support for Rocktech RK043FN48H panel Date: Fri, 2 Jun 2023 12:21:21 +0200 Message-Id: <20230602102123.3345587-6-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-Mailman-Approved-At: Sat, 03 Jun 2023 07:02:50 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Dario Binacchi , kernel test robot , Sam Ravnborg , Amarula patchwork , dri-devel@lists.freedesktop.org, michael@amarulasolutions.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add support for Rocktech RK043FN48H 4.3" (480x272) LCD-TFT panel. Signed-off-by: Dario Binacchi Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306020343.jNTWeM0P-lkp@intel.com/ --- Changes in v2: - Fix build warning reported by kernel test robot. - Add 'Reported-by' tag of kernel test robot. drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 065f378bba9d..3b10e78d07d9 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -3188,6 +3188,32 @@ static const struct panel_desc qishenglong_gopher2b_lcd = { .connector_type = DRM_MODE_CONNECTOR_DPI, }; +static const struct display_timing rocktech_rk043fn48h_timing = { + .pixelclock = { 6000000, 9000000, 12000000 }, + .hactive = { 480, 480, 480 }, + .hback_porch = { 8, 43, 43 }, + .hfront_porch = { 2, 8, 8 }, + .hsync_len = { 1, 1, 1 }, + .vactive = { 272, 272, 272 }, + .vback_porch = { 2, 12, 12 }, + .vfront_porch = { 1, 4, 4 }, + .vsync_len = { 1, 10, 10 }, + .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW | + DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE, +}; + +static const struct panel_desc rocktech_rk043fn48h = { + .timings = &rocktech_rk043fn48h_timing, + .num_timings = 1, + .bpc = 8, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24, + .connector_type = DRM_MODE_CONNECTOR_DPI, +}; + static const struct display_timing rocktech_rk070er9427_timing = { .pixelclock = { 26400000, 33300000, 46800000 }, .hactive = { 800, 800, 800 }, @@ -4218,6 +4244,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "qishenglong,gopher2b-lcd", .data = &qishenglong_gopher2b_lcd, + }, { + .compatible = "rocktech,rk043fn48h", + .data = &rocktech_rk043fn48h, }, { .compatible = "rocktech,rk070er9427", .data = &rocktech_rk070er9427, From patchwork Fri Jun 2 10:21:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13266083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 534F6C7EE2F for ; Sat, 3 Jun 2023 07:02:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9600010E205; Sat, 3 Jun 2023 07:02:51 +0000 (UTC) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by gabe.freedesktop.org (Postfix) with ESMTPS id D1E7C10E647 for ; Fri, 2 Jun 2023 10:21:44 +0000 (UTC) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f60a27c4a2so2011206e87.2 for ; Fri, 02 Jun 2023 03:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1685701302; x=1688293302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yAW+zzizoPdH0S/aO5WCXuWp95MvJ4568t/x7rERkZ8=; b=GsIwW50OWWABkFl4+MuMJVsJnIxd4RnUEQwdl1LBq+pD8w0HebLB/EDl2doqWRzJ8d FUc1iu7tzIbfsEjTdGKjveBeIhM3zz7X0KyRVROnmgYdIZH/WJXnskct5oE9wQHVFSwh lNzJ/DZ81S3JWUisdMUcVi1iR/gQGgqeymMQg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685701302; x=1688293302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yAW+zzizoPdH0S/aO5WCXuWp95MvJ4568t/x7rERkZ8=; b=CjkrYllgdexXwW+WHd4AINgy8aXzpE/dAVu22fZn4mp+2CRvfmyigNF+ELIIOcybYA cOFHA3yn8TbZDJmogmcC6emP/63L/UeoiPP9G25dL+j2kCelII4V7vw0ZQJx2OtLiE3z VpNBRIJDujCQpctQDJASu1g+qfbN14BH2rqSbpmxFMQTobI8kNPUQvKNGRVxD9bHxlGT 3ZJ0y1Ajzz9/VwYL9cEkxbnL6wFt/JYhEpnNgprzVNDgdXoE0v4UMxJ0x2T8hcH1bI77 cFjif6aF10icZ3D+nu0DskCa5rkwzn9IX48F953gt0dP+ngGnCoCUTNb0kKBmzY/lIHB zC2A== X-Gm-Message-State: AC+VfDwKzmk/sSmIt29dk5mIZwy1dVjacUA8sVneXZh9eh8vASyTwRNv 6N/eI5wZR+GmHgPmP028kIjV0Pd+mpXQrTrX25SEww== X-Google-Smtp-Source: ACHHUZ4v/QjfVIurcf6EcYp74yUStSbnTwORv45UFzpMUVWYQmmjYWbUpX5dFUE23r1qClGmatwwkg== 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 To: linux-kernel@vger.kernel.org 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-Mailman-Approved-At: Sat, 03 Jun 2023 07:02:50 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dario Binacchi , Maxime Coquelin , Raphael Gallais-Pou , Amarula patchwork , Yannick Fertre , Alexandre Torgue , dri-devel@lists.freedesktop.org, Philippe Cornu , michael@amarulasolutions.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- (no changes since v1) drivers/gpu/drm/stm/drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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;