mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 22:23:55 +00:00
- A bunch of fixes to cleanup path in meson
- Fix the DMT TDMS clock filtering on meson - Fix an issue with NV12 buffers on rockchip when scaling is active - Fix a couple of use-after-free -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXJixJAAKCRDj7w1vZxhR xTmiAQCVzG4gSQLsB0qHBA5FpvzMTgeVAYZkKYV4A2X0mLgkjAEAwsSspEBCAKyw zlE88ohe+2QQzmxuib7JoPLFD1In4wo= =ozhR -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2019-03-25' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - A bunch of fixes to cleanup path in meson - Fix the DMT TDMS clock filtering on meson - Fix an issue with NV12 buffers on rockchip when scaling is active - Fix a couple of use-after-free Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190325104523.obnfelgvaglyhe5e@flea
This commit is contained in:
commit
de53874a0f
@ -337,12 +337,14 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
|
||||
ret = drm_dev_register(drm, 0);
|
||||
if (ret)
|
||||
goto free_drm;
|
||||
goto uninstall_irq;
|
||||
|
||||
drm_fbdev_generic_setup(drm, 32);
|
||||
|
||||
return 0;
|
||||
|
||||
uninstall_irq:
|
||||
drm_irq_uninstall(drm);
|
||||
free_drm:
|
||||
drm_dev_put(drm);
|
||||
|
||||
@ -356,8 +358,8 @@ static int meson_drv_bind(struct device *dev)
|
||||
|
||||
static void meson_drv_unbind(struct device *dev)
|
||||
{
|
||||
struct drm_device *drm = dev_get_drvdata(dev);
|
||||
struct meson_drm *priv = drm->dev_private;
|
||||
struct meson_drm *priv = dev_get_drvdata(dev);
|
||||
struct drm_device *drm = priv->drm;
|
||||
|
||||
if (priv->canvas) {
|
||||
meson_canvas_free(priv->canvas, priv->canvas_id_osd1);
|
||||
@ -367,6 +369,7 @@ static void meson_drv_unbind(struct device *dev)
|
||||
}
|
||||
|
||||
drm_dev_unregister(drm);
|
||||
drm_irq_uninstall(drm);
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
drm_mode_config_cleanup(drm);
|
||||
drm_dev_put(drm);
|
||||
|
@ -569,7 +569,8 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
|
||||
DRM_DEBUG_DRIVER("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
|
||||
|
||||
/* If sink max TMDS clock, we reject the mode */
|
||||
if (mode->clock > connector->display_info.max_tmds_clock)
|
||||
if (connector->display_info.max_tmds_clock &&
|
||||
mode->clock > connector->display_info.max_tmds_clock)
|
||||
return MODE_BAD;
|
||||
|
||||
/* Check against non-VIC supported modes */
|
||||
|
@ -541,6 +541,18 @@ static void vop_core_clks_disable(struct vop *vop)
|
||||
clk_disable(vop->hclk);
|
||||
}
|
||||
|
||||
static void vop_win_disable(struct vop *vop, const struct vop_win_data *win)
|
||||
{
|
||||
if (win->phy->scl && win->phy->scl->ext) {
|
||||
VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, cbcr_hor_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, cbcr_ver_scl_mode, SCALE_NONE);
|
||||
}
|
||||
|
||||
VOP_WIN_SET(vop, win, enable, 0);
|
||||
}
|
||||
|
||||
static int vop_enable(struct drm_crtc *crtc)
|
||||
{
|
||||
struct vop *vop = to_vop(crtc);
|
||||
@ -586,7 +598,7 @@ static int vop_enable(struct drm_crtc *crtc)
|
||||
struct vop_win *vop_win = &vop->win[i];
|
||||
const struct vop_win_data *win = vop_win->data;
|
||||
|
||||
VOP_WIN_SET(vop, win, enable, 0);
|
||||
vop_win_disable(vop, win);
|
||||
}
|
||||
spin_unlock(&vop->reg_lock);
|
||||
|
||||
@ -735,7 +747,7 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
|
||||
|
||||
spin_lock(&vop->reg_lock);
|
||||
|
||||
VOP_WIN_SET(vop, win, enable, 0);
|
||||
vop_win_disable(vop, win);
|
||||
|
||||
spin_unlock(&vop->reg_lock);
|
||||
}
|
||||
@ -1622,7 +1634,7 @@ static int vop_initial(struct vop *vop)
|
||||
int channel = i * 2 + 1;
|
||||
|
||||
VOP_WIN_SET(vop, win, channel, (channel + 1) << 4 | channel);
|
||||
VOP_WIN_SET(vop, win, enable, 0);
|
||||
vop_win_disable(vop, win);
|
||||
VOP_WIN_SET(vop, win, gate, 1);
|
||||
}
|
||||
|
||||
|
@ -191,13 +191,9 @@ static struct drm_gem_object *vgem_gem_create(struct drm_device *dev,
|
||||
ret = drm_gem_handle_create(file, &obj->base, handle);
|
||||
drm_gem_object_put_unlocked(&obj->base);
|
||||
if (ret)
|
||||
goto err;
|
||||
return ERR_PTR(ret);
|
||||
|
||||
return &obj->base;
|
||||
|
||||
err:
|
||||
__vgem_gem_destroy(obj);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
|
@ -111,11 +111,8 @@ struct drm_gem_object *vkms_gem_create(struct drm_device *dev,
|
||||
|
||||
ret = drm_gem_handle_create(file, &obj->gem, handle);
|
||||
drm_gem_object_put_unlocked(&obj->gem);
|
||||
if (ret) {
|
||||
drm_gem_object_release(&obj->gem);
|
||||
kfree(obj);
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
return &obj->gem;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user