Merge tag 'drm-misc-next-fixes-2017-07-10' of git://anongit.freedesktop.org/git/drm-misc into drm-next
Core Changes: - Fix empty timestamps on hw without vlbank counter (Laurent) - Clear atomic state before retrying ww/mutex acquisition in remove_fb (Maarten) Driver Changes: - rockchip: Fix incorrect NULL pointer check after allocation (Gustavo) Cc: Gustavo A. R. Silva <garsilva@embeddedor.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> * tag 'drm-misc-next-fixes-2017-07-10' of git://anongit.freedesktop.org/git/drm-misc: drm/rockchip: fix NULL check on devm_kzalloc() return value drm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb drm: vblank: Fix vblank timestamp update DRM: Fix an incorrectly formatted table bridge: Fix panel-bridge error return on !panel. drm/rockchip: gem: add the lacks lock and trivial changes
This commit is contained in:
commit
0355e22a4b
|
@ -161,7 +161,7 @@ struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel,
|
|||
int ret;
|
||||
|
||||
if (!panel)
|
||||
return ERR_PTR(EINVAL);
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
panel_bridge = devm_kzalloc(panel->dev, sizeof(*panel_bridge),
|
||||
GFP_KERNEL);
|
||||
|
|
|
@ -832,6 +832,7 @@ unlock:
|
|||
drm_atomic_clean_old_fb(dev, plane_mask, ret);
|
||||
|
||||
if (ret == -EDEADLK) {
|
||||
drm_atomic_state_clear(state);
|
||||
drm_modeset_backoff(&ctx);
|
||||
goto retry;
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
|
|||
* Otherwise reinitialize delayed at next vblank interrupt and assign 0
|
||||
* for now, to mark the vblanktimestamp as invalid.
|
||||
*/
|
||||
if (!rc && in_vblank_irq)
|
||||
if (!rc && !in_vblank_irq)
|
||||
t_vblank = (struct timeval) {0, 0};
|
||||
|
||||
store_vblank(dev, pipe, diff, &t_vblank, cur_vblank);
|
||||
|
|
|
@ -1195,7 +1195,7 @@ static int cdn_dp_probe(struct platform_device *pdev)
|
|||
continue;
|
||||
|
||||
port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL);
|
||||
if (!dp)
|
||||
if (!port)
|
||||
return -ENOMEM;
|
||||
|
||||
port->extcon = extcon;
|
||||
|
|
|
@ -45,13 +45,13 @@ struct rockchip_crtc_state {
|
|||
*
|
||||
* @crtc: array of enabled CRTCs, used to map from "pipe" to drm_crtc.
|
||||
* @num_pipe: number of pipes for this device.
|
||||
* @mm_lock: protect drm_mm on multi-threads.
|
||||
*/
|
||||
struct rockchip_drm_private {
|
||||
struct drm_fb_helper fbdev_helper;
|
||||
struct drm_gem_object *fbdev_bo;
|
||||
struct drm_atomic_state *state;
|
||||
struct iommu_domain *domain;
|
||||
/* protect drm_mm on multi-threads */
|
||||
struct mutex mm_lock;
|
||||
struct drm_mm mm;
|
||||
struct list_head psr_list;
|
||||
|
|
|
@ -29,12 +29,11 @@ static int rockchip_gem_iommu_map(struct rockchip_gem_object *rk_obj)
|
|||
ssize_t ret;
|
||||
|
||||
mutex_lock(&private->mm_lock);
|
||||
|
||||
ret = drm_mm_insert_node_generic(&private->mm, &rk_obj->mm,
|
||||
rk_obj->base.size, PAGE_SIZE,
|
||||
0, 0);
|
||||
|
||||
mutex_unlock(&private->mm_lock);
|
||||
|
||||
if (ret < 0) {
|
||||
DRM_ERROR("out of I/O virtual memory: %zd\n", ret);
|
||||
return ret;
|
||||
|
@ -56,7 +55,9 @@ static int rockchip_gem_iommu_map(struct rockchip_gem_object *rk_obj)
|
|||
return 0;
|
||||
|
||||
err_remove_node:
|
||||
mutex_lock(&private->mm_lock);
|
||||
drm_mm_remove_node(&rk_obj->mm);
|
||||
mutex_unlock(&private->mm_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -22,56 +22,56 @@ struct dw_hdmi;
|
|||
* 48bit bus.
|
||||
*
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + Format Name + Format Code + Encodings +
|
||||
* | Format Name | Format Code | Encodings |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + RGB 4:4:4 8bit + ``MEDIA_BUS_FMT_RGB888_1X24`` + ``V4L2_YCBCR_ENC_DEFAULT`` +
|
||||
* | RGB 4:4:4 8bit | ``MEDIA_BUS_FMT_RGB888_1X24`` | ``V4L2_YCBCR_ENC_DEFAULT`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + RGB 4:4:4 10bits + ``MEDIA_BUS_FMT_RGB101010_1X30`` + ``V4L2_YCBCR_ENC_DEFAULT`` +
|
||||
* | RGB 4:4:4 10bits | ``MEDIA_BUS_FMT_RGB101010_1X30`` | ``V4L2_YCBCR_ENC_DEFAULT`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + RGB 4:4:4 12bits + ``MEDIA_BUS_FMT_RGB121212_1X36`` + ``V4L2_YCBCR_ENC_DEFAULT`` +
|
||||
* | RGB 4:4:4 12bits | ``MEDIA_BUS_FMT_RGB121212_1X36`` | ``V4L2_YCBCR_ENC_DEFAULT`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + RGB 4:4:4 16bits + ``MEDIA_BUS_FMT_RGB161616_1X48`` + ``V4L2_YCBCR_ENC_DEFAULT`` +
|
||||
* | RGB 4:4:4 16bits | ``MEDIA_BUS_FMT_RGB161616_1X48`` | ``V4L2_YCBCR_ENC_DEFAULT`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:4:4 8bit + ``MEDIA_BUS_FMT_YUV8_1X24`` + ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_XV601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_XV709`` +
|
||||
* | YCbCr 4:4:4 8bit | ``MEDIA_BUS_FMT_YUV8_1X24`` | ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_XV601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_XV709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:4:4 10bits + ``MEDIA_BUS_FMT_YUV10_1X30`` + ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_XV601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_XV709`` +
|
||||
* | YCbCr 4:4:4 10bits | ``MEDIA_BUS_FMT_YUV10_1X30`` | ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_XV601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_XV709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:4:4 12bits + ``MEDIA_BUS_FMT_YUV12_1X36`` + ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_XV601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_XV709`` +
|
||||
* | YCbCr 4:4:4 12bits | ``MEDIA_BUS_FMT_YUV12_1X36`` | ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_XV601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_XV709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:4:4 16bits + ``MEDIA_BUS_FMT_YUV16_1X48`` + ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_XV601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_XV709`` +
|
||||
* | YCbCr 4:4:4 16bits | ``MEDIA_BUS_FMT_YUV16_1X48`` | ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_XV601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_XV709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:2:2 8bit + ``MEDIA_BUS_FMT_UYVY8_1X16`` + ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* | YCbCr 4:2:2 8bit | ``MEDIA_BUS_FMT_UYVY8_1X16`` | ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:2:2 10bits + ``MEDIA_BUS_FMT_UYVY10_1X20`` + ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* | YCbCr 4:2:2 10bits | ``MEDIA_BUS_FMT_UYVY10_1X20`` | ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:2:2 12bits + ``MEDIA_BUS_FMT_UYVY12_1X24`` + ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* | YCbCr 4:2:2 12bits | ``MEDIA_BUS_FMT_UYVY12_1X24`` | ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:2:0 8bit + ``MEDIA_BUS_FMT_UYYVYY8_0_5X24`` + ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* | YCbCr 4:2:0 8bit | ``MEDIA_BUS_FMT_UYYVYY8_0_5X24`` | ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:2:0 10bits + ``MEDIA_BUS_FMT_UYYVYY10_0_5X30``+ ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* | YCbCr 4:2:0 10bits | ``MEDIA_BUS_FMT_UYYVYY10_0_5X30``| ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:2:0 12bits + ``MEDIA_BUS_FMT_UYYVYY12_0_5X36``+ ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* | YCbCr 4:2:0 12bits | ``MEDIA_BUS_FMT_UYYVYY12_0_5X36``| ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
* + YCbCr 4:2:0 16bits + ``MEDIA_BUS_FMT_UYYVYY16_0_5X48``+ ``V4L2_YCBCR_ENC_601`` +
|
||||
* + + + or ``V4L2_YCBCR_ENC_709`` +
|
||||
* | YCbCr 4:2:0 16bits | ``MEDIA_BUS_FMT_UYYVYY16_0_5X48``| ``V4L2_YCBCR_ENC_601`` |
|
||||
* | | | or ``V4L2_YCBCR_ENC_709`` |
|
||||
* +----------------------+----------------------------------+------------------------------+
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue