From nobody Mon Nov 25 09:21:17 2024 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.3]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A442191F84 for ; Mon, 28 Oct 2024 07:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.3 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730101332; cv=none; b=GY5adPYB77bo9q/ofscka/Ub7Rimoqcuqi549lIn5tIq90D5449VSOjPfKIzxKT9CmKx86umOqFX8x95PoOx05Q4kEMjVfflyR3i/k3ZcXw92hSQUVkXI7vodNW/etgYD41ZJ/XVADF5+5zlGVlsYGT3g4nHqELScQERUAZ36gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730101332; c=relaxed/simple; bh=lvpf4L9Rqv+7xoDBIQvnbk1TRjftRLEPcDgj/WlrS6c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lLk6TrdnbdEL7rXoS/0XIJCIf7+GXx1RQQpUX5wK68POcMwN4FIT5kmFOD8K0ByV/rPMEctf80qrHrk/XM4cij1BHW0pMLlyi/L2/4rwvuHxWlbPSF2d+zbuXL/Xcl9Y9ZWyC6Jjojs04uuCLIGgjl1PFHm1NiGeZOQa43T5Y+8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=O3ZDwoOa; arc=none smtp.client-ip=117.135.210.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="O3ZDwoOa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=ReNNa /bjIUuQfNRlBiXhYY/+3u8nvvMSOrGOZBdjHB0=; b=O3ZDwoOajOf3TPWHJlXlb DnNxqlYO2fv0gRHOTg8W7dd/MUwDJwX1SFnWeH23dqRvT4GFRdXh3VWdWKT9UcgB 99EIr0BQe71NtFKty3glh2L9IFl5Pbo2YJxok4mrk0+ne3vmNOI9I799m1h3T0nC jaaC+8sE4A5ZcXYto9eRP0= Received: from ProDesk.. (unknown [58.22.7.114]) by gzga-smtp-mtada-g0-4 (Coremail) with SMTP id _____wDnr6c1QB9nigGjDg--.909S2; Mon, 28 Oct 2024 15:41:44 +0800 (CST) From: Andy Yan To: heiko@sntech.de Cc: hjc@rock-chips.com, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Andy Yan Subject: [PATCH] drm/rockchip: vop2: Don't spam logs in atomic update Date: Mon, 28 Oct 2024 15:41:34 +0800 Message-ID: <20241028074140.382199-1-andyshrk@163.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wDnr6c1QB9nigGjDg--.909S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxJw13Gr1xCw4kAr4rZFyUGFg_yoW5WFW8pF y7CF909r4Utr4qga47JrZxZr43K392ka4xtF4xW3W7K343trn7JrsxGF4xJrWYvF48u34U AFn8J34Y9a4xZF7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j-SdgUUUUU= X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/xtbB0gyGXmcfN0LRQQAAsb Content-Type: text/plain; charset="utf-8" From: Andy Yan Demote the error message to drm_dbg_kms to only print the message if the respective debug messages are enabled. Signed-off-by: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm= /rockchip/rockchip_drm_vop2.c index 5c5459ee03076..e75b027674869 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1373,8 +1373,9 @@ static void vop2_plane_atomic_update(struct drm_plane= *plane, dsp_w =3D drm_rect_width(dest); =20 if (dest->x1 + dsp_w > adjusted_mode->hdisplay) { - drm_err(vop2->drm, "vp%d %s dest->x1[%d] + dsp_w[%d] exceed mode hdispla= y[%d]\n", - vp->id, win->data->name, dest->x1, dsp_w, adjusted_mode->hdisplay); + drm_dbg_kms(vop2->drm, + "vp%d %s dest->x1[%d] + dsp_w[%d] exceed mode hdisplay[%d]\n", + vp->id, win->data->name, dest->x1, dsp_w, adjusted_mode->hdisplay); dsp_w =3D adjusted_mode->hdisplay - dest->x1; if (dsp_w < 4) dsp_w =3D 4; @@ -1384,8 +1385,9 @@ static void vop2_plane_atomic_update(struct drm_plane= *plane, dsp_h =3D drm_rect_height(dest); =20 if (dest->y1 + dsp_h > adjusted_mode->vdisplay) { - drm_err(vop2->drm, "vp%d %s dest->y1[%d] + dsp_h[%d] exceed mode vdispla= y[%d]\n", - vp->id, win->data->name, dest->y1, dsp_h, adjusted_mode->vdisplay); + drm_dbg_kms(vop2->drm, + "vp%d %s dest->y1[%d] + dsp_h[%d] exceed mode vdisplay[%d]\n", + vp->id, win->data->name, dest->y1, dsp_h, adjusted_mode->vdisplay); dsp_h =3D adjusted_mode->vdisplay - dest->y1; if (dsp_h < 4) dsp_h =3D 4; @@ -1398,14 +1400,14 @@ static void vop2_plane_atomic_update(struct drm_pla= ne *plane, */ if (!(win->data->feature & WIN_FEATURE_AFBDC)) { if (actual_w > dsp_w && (actual_w & 0xf) =3D=3D 1) { - drm_err(vop2->drm, "vp%d %s act_w[%d] MODE 16 =3D=3D 1\n", + drm_dbg_kms(vop2->drm, "vp%d %s act_w[%d] MODE 16 =3D=3D 1\n", vp->id, win->data->name, actual_w); actual_w -=3D 1; } } =20 if (afbc_en && actual_w % 4) { - drm_err(vop2->drm, "vp%d %s actual_w[%d] not 4 pixel aligned\n", + drm_dbg_kms(vop2->drm, "vp%d %s actual_w[%d] not 4 pixel aligned\n", vp->id, win->data->name, actual_w); actual_w =3D ALIGN_DOWN(actual_w, 4); } @@ -1443,7 +1445,7 @@ static void vop2_plane_atomic_update(struct drm_plane= *plane, */ stride =3D (fb->pitches[0] << 3) / bpp; if ((stride & 0x3f) && (xmirror || rotate_90 || rotate_270)) - drm_err(vop2->drm, "vp%d %s stride[%d] not 64 pixel aligned\n", + drm_dbg_kms(vop2->drm, "vp%d %s stride[%d] not 64 pixel aligned\n", vp->id, win->data->name, stride); =20 uv_swap =3D vop2_afbc_uv_swap(fb->format->format); --=20 2.34.1