From eb70c5fe3be787b047effa67f546ed00fcd82d0b Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Wed, 5 Feb 2020 20:51:15 +0100 Subject: [PATCH] Allwinner: Use lima for mali400 --- projects/Allwinner/devices/A20/options | 2 +- projects/Allwinner/devices/A64/options | 2 +- projects/Allwinner/devices/H3/options | 2 +- projects/Allwinner/linux/linux.aarch64.conf | 6 +-- projects/Allwinner/linux/linux.arm.conf | 4 +- projects/Allwinner/options | 2 +- .../linux/0002-backport-from-5.7.patch | 39 +++++++++++++++++++ 7 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 projects/Allwinner/patches/linux/0002-backport-from-5.7.patch diff --git a/projects/Allwinner/devices/A20/options b/projects/Allwinner/devices/A20/options index 2f245dbd4b..e79fa52d3d 100644 --- a/projects/Allwinner/devices/A20/options +++ b/projects/Allwinner/devices/A20/options @@ -38,7 +38,7 @@ KERNEL_TARGET="zImage" # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) - OPENGLES="libmali" + OPENGLES="mesa" # Mali GPU family MALI_FAMILY="400" diff --git a/projects/Allwinner/devices/A64/options b/projects/Allwinner/devices/A64/options index 916de3b3a9..eab7eb4c0f 100644 --- a/projects/Allwinner/devices/A64/options +++ b/projects/Allwinner/devices/A64/options @@ -32,7 +32,7 @@ ATF_PLATFORM="sun50i_a64" # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) - OPENGLES="libmali" + OPENGLES="mesa" # Mali GPU family MALI_FAMILY="400" diff --git a/projects/Allwinner/devices/H3/options b/projects/Allwinner/devices/H3/options index 8cecb974f4..67ac4cc751 100644 --- a/projects/Allwinner/devices/H3/options +++ b/projects/Allwinner/devices/H3/options @@ -38,7 +38,7 @@ KERNEL_TARGET="zImage" # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) - OPENGLES="libmali" + OPENGLES="mesa" # Mali GPU family MALI_FAMILY="400" diff --git a/projects/Allwinner/linux/linux.aarch64.conf b/projects/Allwinner/linux/linux.aarch64.conf index b43117d5c3..7f9169e6bf 100644 --- a/projects/Allwinner/linux/linux.aarch64.conf +++ b/projects/Allwinner/linux/linux.aarch64.conf @@ -3469,7 +3469,7 @@ CONFIG_DRM_FBDEV_OVERALLOC=100 CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y CONFIG_DRM_GEM_SHMEM_HELPER=y -CONFIG_DRM_SCHED=y +CONFIG_DRM_SCHED=m # # I2C encoder or helper chips @@ -3574,8 +3574,8 @@ CONFIG_DRM_DW_HDMI_CEC=y # CONFIG_TINYDRM_ST7586 is not set # CONFIG_TINYDRM_ST7735R is not set # CONFIG_DRM_PL111 is not set -# CONFIG_DRM_LIMA is not set -CONFIG_DRM_PANFROST=y +CONFIG_DRM_LIMA=m +CONFIG_DRM_PANFROST=m # CONFIG_DRM_LEGACY is not set CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y diff --git a/projects/Allwinner/linux/linux.arm.conf b/projects/Allwinner/linux/linux.arm.conf index 981ab3cb63..5268dbfdcb 100644 --- a/projects/Allwinner/linux/linux.arm.conf +++ b/projects/Allwinner/linux/linux.arm.conf @@ -3393,6 +3393,8 @@ CONFIG_DRM_FBDEV_OVERALLOC=100 # CONFIG_DRM_DP_CEC is not set CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y +CONFIG_DRM_GEM_SHMEM_HELPER=y +CONFIG_DRM_SCHED=m # # I2C encoder or helper chips @@ -3497,7 +3499,7 @@ CONFIG_DRM_DW_HDMI_CEC=y # CONFIG_TINYDRM_ST7735R is not set # CONFIG_DRM_PL111 is not set # CONFIG_DRM_TVE200 is not set -# CONFIG_DRM_LIMA is not set +CONFIG_DRM_LIMA=m # CONFIG_DRM_PANFROST is not set # CONFIG_DRM_MCDE is not set # CONFIG_DRM_LEGACY is not set diff --git a/projects/Allwinner/options b/projects/Allwinner/options index 697ac4633f..0a3b7ca75f 100644 --- a/projects/Allwinner/options +++ b/projects/Allwinner/options @@ -46,7 +46,7 @@ # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia) # Space separated list is supported, # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia" - GRAPHIC_DRIVERS="panfrost" + GRAPHIC_DRIVERS="lima panfrost" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported, diff --git a/projects/Allwinner/patches/linux/0002-backport-from-5.7.patch b/projects/Allwinner/patches/linux/0002-backport-from-5.7.patch new file mode 100644 index 0000000000..f0c8e218af --- /dev/null +++ b/projects/Allwinner/patches/linux/0002-backport-from-5.7.patch @@ -0,0 +1,39 @@ +From cf913e9683273f2640501094fa63a67e29f437b3 Mon Sep 17 00:00:00 2001 +From: Jernej Skrabec +Date: Sun, 26 Jan 2020 07:59:37 +0100 +Subject: [PATCH] Revert "drm/sun4i: drv: Allow framebuffer modifiers in mode + config" + +This reverts commit 9db9c0cf5895e4ddde2814360cae7bea9282edd2. + +Setting mode_config.allow_fb_modifiers manually is completely +unnecessary. It is set automatically by drm_universal_plane_init() based +on the fact if modifier list is provided or not. Even more, it breaks +DE2 and DE3 as they don't support any modifiers beside linear. Modifiers +aware applications can be confused by provided empty modifier list - at +least linear modifier should be included, but it's not for DE2 and DE3. + +Fixes: 9db9c0cf5895 ("drm/sun4i: drv: Allow framebuffer modifiers in mode config") +Signed-off-by: Jernej Skrabec +Reviewed-by: Paul Kocialkowski +Signed-off-by: Maxime Ripard +Link: https://patchwork.freedesktop.org/patch/msgid/20200126065937.9564-1-jernej.skrabec@siol.net +--- + drivers/gpu/drm/sun4i/sun4i_drv.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c +index a5757b11b730..5b54eff12cc0 100644 +--- a/drivers/gpu/drm/sun4i/sun4i_drv.c ++++ b/drivers/gpu/drm/sun4i/sun4i_drv.c +@@ -85,7 +85,6 @@ static int sun4i_drv_bind(struct device *dev) + } + + drm_mode_config_init(drm); +- drm->mode_config.allow_fb_modifiers = true; + + ret = component_bind_all(drm->dev, drm); + if (ret) { +-- +2.25.0 +