diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-08-21 10:54:34 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-08-21 19:07:07 +0200 |
commit | 8299d1f057439f94c6a4412e2e5c5082b82a30c9 (patch) | |
tree | 1bf678d61f11f7394493be464c7876e496f7faed /target/linux/bcm27xx/patches-5.10/950-0529-drm-vc4-Use-the-new-helpers.patch | |
parent | 33b6885975ce376ff075362b7f0890326043111b (diff) | |
download | upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.gz upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.bz2 upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.zip |
bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted
patches, wireless patches and defconfig patches.
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 4B v1.1 4G
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.10/950-0529-drm-vc4-Use-the-new-helpers.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.10/950-0529-drm-vc4-Use-the-new-helpers.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0529-drm-vc4-Use-the-new-helpers.patch b/target/linux/bcm27xx/patches-5.10/950-0529-drm-vc4-Use-the-new-helpers.patch new file mode 100644 index 0000000000..16412f8efe --- /dev/null +++ b/target/linux/bcm27xx/patches-5.10/950-0529-drm-vc4-Use-the-new-helpers.patch @@ -0,0 +1,62 @@ +From b29e72769f843afeb4585c5310f8bf23c0277daf Mon Sep 17 00:00:00 2001 +From: Maxime Ripard <maxime@cerno.tech> +Date: Fri, 9 Apr 2021 17:31:55 +0200 +Subject: [PATCH] drm/vc4: Use the new helpers + +We just introduced new helpers, so let's use them. + +Signed-off-by: Maxime Ripard <maxime@cerno.tech> +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 23 ++++------------------- + 1 file changed, 4 insertions(+), 19 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -223,21 +223,6 @@ static int vc4_hdmi_connector_get_modes( + return ret; + } + +-static bool hdr_metadata_equal(const struct drm_connector_state *old_state, +- const struct drm_connector_state *new_state) +-{ +- struct drm_property_blob *old_blob = old_state->hdr_output_metadata; +- struct drm_property_blob *new_blob = new_state->hdr_output_metadata; +- +- if (!old_blob || !new_blob) +- return old_blob == new_blob; +- +- if (old_blob->length != new_blob->length) +- return false; +- +- return !memcmp(old_blob->data, new_blob->data, old_blob->length); +-} +- + static int vc4_hdmi_connector_atomic_check(struct drm_connector *connector, + struct drm_atomic_state *state) + { +@@ -246,12 +231,13 @@ static int vc4_hdmi_connector_atomic_che + struct drm_connector_state *new_state = + drm_atomic_get_new_connector_state(state, connector); + struct drm_crtc *crtc = new_state->crtc; +- struct drm_crtc_state *crtc_state; + + if (!crtc) + return 0; + +- if (!hdr_metadata_equal(old_state, new_state)) { ++ if (!drm_connector_atomic_hdr_metadata_equal(old_state, new_state)) { ++ struct drm_crtc_state *crtc_state; ++ + crtc_state = drm_atomic_get_crtc_state(state, crtc); + if (IS_ERR(crtc_state)) + return PTR_ERR(crtc_state); +@@ -350,8 +336,7 @@ static int vc4_hdmi_connector_init(struc + connector->stereo_allowed = 1; + + if (vc4_hdmi->variant->supports_hdr) +- drm_object_attach_property(&connector->base, +- connector->dev->mode_config.hdr_output_metadata_property, 0); ++ drm_connector_attach_hdr_output_metadata_property(connector); + + drm_connector_attach_encoder(connector, encoder); + |