Commit ee4d7899 authored by Sean Paul's avatar Sean Paul

drm/rockchip: Use DRM_DEV_ERROR in vop

Since we can have multiple vops, use DRM_DEV_ERROR to
make logs easier to process.
Acked-by: default avatarMark Yao <mark.yao@rockchip.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1471021254-2563-3-git-send-email-seanpaul@chromium.org
parent c4e68a58
...@@ -238,7 +238,7 @@ static enum vop_data_format vop_convert_format(uint32_t format) ...@@ -238,7 +238,7 @@ static enum vop_data_format vop_convert_format(uint32_t format)
case DRM_FORMAT_NV24: case DRM_FORMAT_NV24:
return VOP_FMT_YUV444SP; return VOP_FMT_YUV444SP;
default: default:
DRM_ERROR("unsupport format[%08x]\n", format); DRM_ERROR("unsupported format[%08x]\n", format);
return -EINVAL; return -EINVAL;
} }
} }
...@@ -315,7 +315,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win, ...@@ -315,7 +315,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
int vskiplines = 0; int vskiplines = 0;
if (dst_w > 3840) { if (dst_w > 3840) {
DRM_ERROR("Maximum destination width (3840) exceeded\n"); DRM_DEV_ERROR(vop->dev, "Maximum dst width (3840) exceeded\n");
return; return;
} }
...@@ -353,11 +353,11 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win, ...@@ -353,11 +353,11 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
VOP_SCL_SET_EXT(vop, win, lb_mode, lb_mode); VOP_SCL_SET_EXT(vop, win, lb_mode, lb_mode);
if (lb_mode == LB_RGB_3840X2) { if (lb_mode == LB_RGB_3840X2) {
if (yrgb_ver_scl_mode != SCALE_NONE) { if (yrgb_ver_scl_mode != SCALE_NONE) {
DRM_ERROR("ERROR : not allow yrgb ver scale\n"); DRM_DEV_ERROR(vop->dev, "not allow yrgb ver scale\n");
return; return;
} }
if (cbcr_ver_scl_mode != SCALE_NONE) { if (cbcr_ver_scl_mode != SCALE_NONE) {
DRM_ERROR("ERROR : not allow cbcr ver scale\n"); DRM_DEV_ERROR(vop->dev, "not allow cbcr ver scale\n");
return; return;
} }
vsu_mode = SCALE_UP_BIL; vsu_mode = SCALE_UP_BIL;
...@@ -970,7 +970,8 @@ static void vop_crtc_enable(struct drm_crtc *crtc) ...@@ -970,7 +970,8 @@ static void vop_crtc_enable(struct drm_crtc *crtc)
VOP_CTRL_SET(vop, mipi_en, 1); VOP_CTRL_SET(vop, mipi_en, 1);
break; break;
default: default:
DRM_ERROR("unsupport connector_type[%d]\n", s->output_type); DRM_DEV_ERROR(vop->dev, "unsupported connector_type [%d]\n",
s->output_type);
} }
VOP_CTRL_SET(vop, out_mode, s->output_mode); VOP_CTRL_SET(vop, out_mode, s->output_mode);
...@@ -1154,7 +1155,8 @@ static irqreturn_t vop_isr(int irq, void *data) ...@@ -1154,7 +1155,8 @@ static irqreturn_t vop_isr(int irq, void *data)
/* Unhandled irqs are spurious. */ /* Unhandled irqs are spurious. */
if (active_irqs) if (active_irqs)
DRM_ERROR("Unknown VOP IRQs: %#02x\n", active_irqs); DRM_DEV_ERROR(vop->dev, "Unknown VOP IRQs: %#02x\n",
active_irqs);
return ret; return ret;
} }
...@@ -1189,7 +1191,8 @@ static int vop_create_crtc(struct vop *vop) ...@@ -1189,7 +1191,8 @@ static int vop_create_crtc(struct vop *vop)
win_data->phy->nformats, win_data->phy->nformats,
win_data->type, NULL); win_data->type, NULL);
if (ret) { if (ret) {
DRM_ERROR("failed to initialize plane\n"); DRM_DEV_ERROR(vop->dev, "failed to init plane %d\n",
ret);
goto err_cleanup_planes; goto err_cleanup_planes;
} }
...@@ -1227,7 +1230,8 @@ static int vop_create_crtc(struct vop *vop) ...@@ -1227,7 +1230,8 @@ static int vop_create_crtc(struct vop *vop)
win_data->phy->nformats, win_data->phy->nformats,
win_data->type, NULL); win_data->type, NULL);
if (ret) { if (ret) {
DRM_ERROR("failed to initialize overlay plane\n"); DRM_DEV_ERROR(vop->dev, "failed to init overlay %d\n",
ret);
goto err_cleanup_crtc; goto err_cleanup_crtc;
} }
drm_plane_helper_add(&vop_win->base, &plane_helper_funcs); drm_plane_helper_add(&vop_win->base, &plane_helper_funcs);
...@@ -1235,8 +1239,8 @@ static int vop_create_crtc(struct vop *vop) ...@@ -1235,8 +1239,8 @@ static int vop_create_crtc(struct vop *vop)
port = of_get_child_by_name(dev->of_node, "port"); port = of_get_child_by_name(dev->of_node, "port");
if (!port) { if (!port) {
DRM_ERROR("no port node found in %s\n", DRM_DEV_ERROR(vop->dev, "no port node found in %s\n",
dev->of_node->full_name); dev->of_node->full_name);
ret = -ENOENT; ret = -ENOENT;
goto err_cleanup_crtc; goto err_cleanup_crtc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment