From patchwork Fri Aug 12 17:00:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9277497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7D32F60752 for ; Fri, 12 Aug 2016 17:01:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A20128AB9 for ; Fri, 12 Aug 2016 17:01:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E40828ABF; Fri, 12 Aug 2016 17:01:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0B36C28AB9 for ; Fri, 12 Aug 2016 17:01:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bYFpn-0005RR-EQ; Fri, 12 Aug 2016 17:01:27 +0000 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bYFpi-0005NB-TV for linux-rockchip@lists.infradead.org; Fri, 12 Aug 2016 17:01:24 +0000 Received: by mail-qk0-x235.google.com with SMTP id f123so14752628qkd.1 for ; Fri, 12 Aug 2016 10:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iIzCroYXU5bUtOhy8FaCMRngqSJvFpclRCZHqLXzZrE=; b=n6WAy2dC0d3Mr8/9+BvEL6DYFLkxU5YXa9zX63M8IpByqaj1BErQ4u89azW2HgYZ2T cVUyYfQHKf19wAjelIUhsC/cVsScjrE0mAfAa2ouKTOgzsmVmPdsyrnPYBCOuTb+wGBA tDO4JMW6J7v4kz9fS4GU2x2ba7YNYuMk0Ps6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iIzCroYXU5bUtOhy8FaCMRngqSJvFpclRCZHqLXzZrE=; b=MqTkiPdI+hwoamunkLQB5XK3Nf66XbRABPUnzpuUlEAZmT60SeztU52bf/B3UIn59w qUxbqTv2juOosHlLbBAx720GS4FOUqYQuUnMyq6rM/kg9Vd74smGlrmoZZ0wzAqFNsxF /dCVdg4PPNDxeVP5S62TSPRkUfXFPupN749Uq5n+0JQSIKqSm9bqPeXLBGjEHAE1K+yz rse6RCM5RD+amlOKdLzm14sX2XYfnFLksyjuidXIaOhvK6WULYV86SQOjqpyBpjYTG1W tBv0FJHh+dUJktFZUWausUcxeb0wt7Tr0RL5NCLQ0Le6HtZPuq8QWx/+q7I72rUxBRUu ii4A== X-Gm-Message-State: AEkooutyxETOFS5lRgYEpOgBpd9BA/84DyqqEBiQL8rkaqzmGzkhTEgGKQ/wkBZcN+qNPjOi X-Received: by 10.55.8.200 with SMTP id 191mr18207426qki.196.1471021261539; Fri, 12 Aug 2016 10:01:01 -0700 (PDT) Received: from boxwood.roam.corp.google.com (cpe-75-189-128-87.nc.res.rr.com. [75.189.128.87]) by smtp.gmail.com with ESMTPSA id f130sm3625043qkb.7.2016.08.12.10.01.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Aug 2016 10:01:00 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH 2/2] drm/rockchip: Use DRM_DEV_ERROR in vop Date: Fri, 12 Aug 2016 13:00:54 -0400 Message-Id: <1471021254-2563-3-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1471021254-2563-1-git-send-email-seanpaul@chromium.org> References: <1471021254-2563-1-git-send-email-seanpaul@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160812_100123_113146_45D65161 X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chris@chris-wilson.co.uk, Sean Paul , mark.yao@rock-chips.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since we can have multiple vops, use DRM_DEV_ERROR to make logs easier to process. Signed-off-by: Sean Paul Acked-by: Mark Yao --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 31744fe..ec8ad00 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -238,7 +238,7 @@ static enum vop_data_format vop_convert_format(uint32_t format) case DRM_FORMAT_NV24: return VOP_FMT_YUV444SP; default: - DRM_ERROR("unsupport format[%08x]\n", format); + DRM_ERROR("unsupported format[%08x]\n", format); return -EINVAL; } } @@ -315,7 +315,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win, int vskiplines = 0; if (dst_w > 3840) { - DRM_ERROR("Maximum destination width (3840) exceeded\n"); + DRM_DEV_ERROR(vop->dev, "Maximum dst width (3840) exceeded\n"); return; } @@ -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); if (lb_mode == LB_RGB_3840X2) { 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; } 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; } vsu_mode = SCALE_UP_BIL; @@ -970,7 +970,8 @@ static void vop_crtc_enable(struct drm_crtc *crtc) VOP_CTRL_SET(vop, mipi_en, 1); break; 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); @@ -1154,7 +1155,8 @@ static irqreturn_t vop_isr(int irq, void *data) /* Unhandled irqs are spurious. */ 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; } @@ -1189,7 +1191,8 @@ static int vop_create_crtc(struct vop *vop) win_data->phy->nformats, win_data->type, NULL); 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; } @@ -1227,7 +1230,8 @@ static int vop_create_crtc(struct vop *vop) win_data->phy->nformats, win_data->type, NULL); 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; } drm_plane_helper_add(&vop_win->base, &plane_helper_funcs); @@ -1235,8 +1239,8 @@ static int vop_create_crtc(struct vop *vop) port = of_get_child_by_name(dev->of_node, "port"); if (!port) { - DRM_ERROR("no port node found in %s\n", - dev->of_node->full_name); + DRM_DEV_ERROR(vop->dev, "no port node found in %s\n", + dev->of_node->full_name); ret = -ENOENT; goto err_cleanup_crtc; }