From f07e572f6447465d8938679533d604e402b0f066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Feb 2021 18:04:33 +0100 Subject: bcm27xx: import latest patches from the RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G bcm2710: boot tested on RPi 3B v1.2 bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas --- ...-drm-vc4-hdmi-Remove-vc4_dev-hdmi-pointer.patch | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0572-drm-vc4-hdmi-Remove-vc4_dev-hdmi-pointer.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0572-drm-vc4-hdmi-Remove-vc4_dev-hdmi-pointer.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0572-drm-vc4-hdmi-Remove-vc4_dev-hdmi-pointer.patch b/target/linux/bcm27xx/patches-5.4/950-0572-drm-vc4-hdmi-Remove-vc4_dev-hdmi-pointer.patch new file mode 100644 index 0000000000..24e4229c0e --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0572-drm-vc4-hdmi-Remove-vc4_dev-hdmi-pointer.patch @@ -0,0 +1,67 @@ +From 9e56da09cb8d8f65a26cfa0a957e295646ca47f8 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Mon, 6 Jan 2020 18:49:11 +0100 +Subject: [PATCH] drm/vc4: hdmi: Remove vc4_dev hdmi pointer + +Now that we don't have any users anymore, we can kill that pointer. + +Signed-off-by: Maxime Ripard +--- + drivers/gpu/drm/vc4/vc4_drv.h | 1 - + drivers/gpu/drm/vc4/vc4_hdmi.c | 14 ++++++-------- + 2 files changed, 6 insertions(+), 9 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -76,7 +76,6 @@ struct vc4_dev { + bool firmware_kms; + struct rpi_firmware *firmware; + +- struct vc4_hdmi *hdmi; + struct vc4_hvs *hvs; + struct vc4_v3d *v3d; + struct vc4_dpi *dpi; +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -1200,7 +1200,6 @@ static int vc4_hdmi_bind(struct device * + #endif + struct platform_device *pdev = to_platform_device(dev); + struct drm_device *drm = dev_get_drvdata(master); +- struct vc4_dev *vc4 = drm->dev_private; + struct vc4_hdmi *vc4_hdmi; + struct drm_encoder *encoder; + struct device_node *ddc_node; +@@ -1288,8 +1287,6 @@ static int vc4_hdmi_bind(struct device * + vc4_hdmi->hpd_active_low = hpd_gpio_flags & OF_GPIO_ACTIVE_LOW; + } + +- vc4->hdmi = vc4_hdmi; +- + /* HDMI core must be enabled. */ + if (!(HD_READ(VC4_HD_M_CTL) & VC4_HD_M_ENABLE)) { + HD_WRITE(VC4_HD_M_CTL, VC4_HD_M_SW_RST); +@@ -1370,9 +1367,12 @@ err_put_i2c: + static void vc4_hdmi_unbind(struct device *dev, struct device *master, + void *data) + { +- struct drm_device *drm = dev_get_drvdata(master); +- struct vc4_dev *vc4 = drm->dev_private; +- struct vc4_hdmi *vc4_hdmi = vc4->hdmi; ++ /* ++ * snd_soc_register_card will set the device drvdata pointer ++ * to the card being registered. ++ */ ++ struct snd_soc_card *card = dev_get_drvdata(dev); ++ struct vc4_hdmi *vc4_hdmi = snd_soc_card_get_drvdata(card); + + cec_unregister_adapter(vc4_hdmi->cec_adap); + vc4_hdmi_connector_destroy(&vc4_hdmi->connector.base); +@@ -1382,8 +1382,6 @@ static void vc4_hdmi_unbind(struct devic + pm_runtime_disable(dev); + + put_device(&vc4_hdmi->ddc->dev); +- +- vc4->hdmi = NULL; + } + + static const struct component_ops vc4_hdmi_ops = { -- cgit v1.2.3