mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:50:53 +07:00
- sun4i: Fix module loading / unloading
- vc4: Fix a compilation error and memory leak - dw-hdmi: Fix an overflow on Rockchip and SCDC configuration -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXMG1sgAKCRDj7w1vZxhR xcD3AP9EFGmXMR0UemGsEwtDHKSPW9Z2Gw89bxIQW5LNb/gRxAD/aeTqFtSSg2bj gI/+U/oDoDRgWySpTeiVkolc7vDyqAI= =J3GS -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2019-04-25' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - sun4i: Fix module loading / unloading - vc4: Fix a compilation error and memory leak - dw-hdmi: Fix an overflow on Rockchip and SCDC configuration Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190425132739.pngmfiqucqmulxkz@flea
This commit is contained in:
commit
528ffbfe64
@ -1046,6 +1046,10 @@ static bool dw_hdmi_support_scdc(struct dw_hdmi *hdmi)
|
||||
if (hdmi->version < 0x200a)
|
||||
return false;
|
||||
|
||||
/* Disable if no DDC bus */
|
||||
if (!hdmi->ddc)
|
||||
return false;
|
||||
|
||||
/* Disable if SCDC is not supported, or if an HF-VSDB block is absent */
|
||||
if (!display->hdmi.scdc.supported ||
|
||||
!display->hdmi.scdc.scrambling.supported)
|
||||
@ -1684,13 +1688,13 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
|
||||
* Source Devices compliant shall set the
|
||||
* Source Version = 1.
|
||||
*/
|
||||
drm_scdc_readb(&hdmi->i2c->adap, SCDC_SINK_VERSION,
|
||||
drm_scdc_readb(hdmi->ddc, SCDC_SINK_VERSION,
|
||||
&bytes);
|
||||
drm_scdc_writeb(&hdmi->i2c->adap, SCDC_SOURCE_VERSION,
|
||||
drm_scdc_writeb(hdmi->ddc, SCDC_SOURCE_VERSION,
|
||||
min_t(u8, bytes, SCDC_MIN_SOURCE_VERSION));
|
||||
|
||||
/* Enabled Scrambling in the Sink */
|
||||
drm_scdc_set_scrambling(&hdmi->i2c->adap, 1);
|
||||
drm_scdc_set_scrambling(hdmi->ddc, 1);
|
||||
|
||||
/*
|
||||
* To activate the scrambler feature, you must ensure
|
||||
@ -1706,7 +1710,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
|
||||
hdmi_writeb(hdmi, 0, HDMI_FC_SCRAMBLER_CTRL);
|
||||
hdmi_writeb(hdmi, (u8)~HDMI_MC_SWRSTZ_TMDSSWRST_REQ,
|
||||
HDMI_MC_SWRSTZ);
|
||||
drm_scdc_set_scrambling(&hdmi->i2c->adap, 0);
|
||||
drm_scdc_set_scrambling(hdmi->ddc, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1800,6 +1804,8 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
|
||||
* iteration for others.
|
||||
* The Amlogic Meson GX SoCs (v2.01a) have been identified as needing
|
||||
* the workaround with a single iteration.
|
||||
* The Rockchip RK3288 SoC (v2.00a) and RK3328/RK3399 SoCs (v2.11a) have
|
||||
* been identified as needing the workaround with a single iteration.
|
||||
*/
|
||||
|
||||
switch (hdmi->version) {
|
||||
@ -1808,7 +1814,9 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
|
||||
break;
|
||||
case 0x131a:
|
||||
case 0x132a:
|
||||
case 0x200a:
|
||||
case 0x201a:
|
||||
case 0x211a:
|
||||
case 0x212a:
|
||||
count = 1;
|
||||
break;
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <linux/of_reserved_mem.h>
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@ -85,6 +86,8 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
ret = -ENOMEM;
|
||||
goto free_drm;
|
||||
}
|
||||
|
||||
dev_set_drvdata(dev, drm);
|
||||
drm->dev_private = drv;
|
||||
INIT_LIST_HEAD(&drv->frontend_list);
|
||||
INIT_LIST_HEAD(&drv->engine_list);
|
||||
@ -144,8 +147,12 @@ static void sun4i_drv_unbind(struct device *dev)
|
||||
|
||||
drm_dev_unregister(drm);
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
drm_mode_config_cleanup(drm);
|
||||
|
||||
component_unbind_all(dev, NULL);
|
||||
of_reserved_mem_device_release(dev);
|
||||
|
||||
drm_dev_put(drm);
|
||||
}
|
||||
|
||||
@ -395,6 +402,8 @@ static int sun4i_drv_probe(struct platform_device *pdev)
|
||||
|
||||
static int sun4i_drv_remove(struct platform_device *pdev)
|
||||
{
|
||||
component_master_del(&pdev->dev, &sun4i_drv_master_ops);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1042,7 +1042,7 @@ static void
|
||||
vc4_crtc_reset(struct drm_crtc *crtc)
|
||||
{
|
||||
if (crtc->state)
|
||||
__drm_atomic_helper_crtc_destroy_state(crtc->state);
|
||||
vc4_crtc_destroy_state(crtc, crtc->state);
|
||||
|
||||
crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
|
||||
if (crtc->state)
|
||||
|
Loading…
Reference in New Issue
Block a user