From patchwork Wed Oct 19 14:37:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13011875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CD61C433FE for ; Wed, 19 Oct 2022 14:38:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AD8110EAF6; Wed, 19 Oct 2022 14:38:28 +0000 (UTC) Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28B8910F24B for ; Wed, 19 Oct 2022 14:38:02 +0000 (UTC) Date: Wed, 19 Oct 2022 14:37:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1666190279; x=1666449479; bh=yWsT5OIuzTT+/9FW9RcipjSK+rK1bGFZrVkXMxvvif0=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID; b=FLB20bWiFpURDw1n1mhDU/d8P8/LpKOnViGpCc13kOnwWD8mrSFGetc127lGFYqGs dO2E1NBxZugKEcpWTEK+ooKvMfqFjYF/7KbFXds+QW7iEFMtYaiWSYT7xGV2rE/eE4 +Q86SB0GTsHyUS1GJ0BDysbiNVr+JIZVmOIhvavn5Frc35fAOuIhy5Vr3Vb3pHxRWc 2tMRD19bUuwPg23RkKcPpOpy7xAooj+wkv9ckOKpykwKWV+DC4oCGC/3k/d6MhGCGQ qZX+BGQGdi+G3Rlr/YR5FA3zzMlH6BgPaNM3baOz2JozqBlcT/QgKNUuS/gNK/il7k yQl6aIeCkYaOg== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 1/7] drm/atomic: log drm_atomic_replace_property_blob_from_id() errors Message-ID: <20221019143736.267324-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Jani Nikula --- drivers/gpu/drm/drm_atomic_uapi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index c06d0639d552..e659fdae477d 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -374,16 +374,25 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev, if (blob_id != 0) { new_blob = drm_property_lookup_blob(dev, blob_id); - if (new_blob == NULL) + if (new_blob == NULL) { + drm_dbg_atomic(dev, + "cannot find blob ID %llu\n", blob_id); return -EINVAL; + } if (expected_size > 0 && new_blob->length != expected_size) { + drm_dbg_atomic(dev, + "[BLOB:%d] length %zu different from expected %zu\n", + new_blob->base.id, new_blob->length, expected_size); drm_property_blob_put(new_blob); return -EINVAL; } if (expected_elem_size > 0 && new_blob->length % expected_elem_size != 0) { + drm_dbg_atomic(dev, + "[BLOB:%d] length %zu not divisible by element size %zu\n", + new_blob->base.id, new_blob->length, expected_elem_size); drm_property_blob_put(new_blob); return -EINVAL; } From patchwork Wed Oct 19 14:37:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13011873 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 417F1C4332F for ; Wed, 19 Oct 2022 14:38:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 880CB10F23F; Wed, 19 Oct 2022 14:38:02 +0000 (UTC) Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 224B710F247 for ; Wed, 19 Oct 2022 14:37:59 +0000 (UTC) Date: Wed, 19 Oct 2022 14:37:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1666190276; x=1666449476; bh=xnh5lw5bGYBpJgz3G8t0R9Z8/B0eZuEXm2vVqAyKBZw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=b3/Ht/qjdHMnrbon1V52Sv1G5OsOz+q0670afdpYw+Pvzsc8tplxGI/UEGd9J90/J pUvzrlwB/ok3cdf28ADJ/J/l7oL5h3ZFl6cpQ61udVMiOcrpr3WovWTo1TsMF3pE9l IqF+p070tovn32M/KjU4gSYdSdVQViHhN/cZaw2NWrPpnk+v8fGP9iviCoWmb+DQeV YiwlooOyFI2+xeHmXx97YQdrJJQ4NlcheOlFaqpgyyP1TVcC3A5YrtXK29RqAnG7or 0lc4q+DhzyZa0m2D2wD2qJi4qOs6c58K07XOf9I3o3wggHiozomKXWK4Bt1C+pHyhF zjoW4qVpa261g== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 2/7] drm/atomic: drop extra bracket from log messages Message-ID: <20221019143736.267324-2-contact@emersion.fr> In-Reply-To: <20221019143736.267324-1-contact@emersion.fr> References: <20221019143736.267324-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Jani Nikula --- drivers/gpu/drm/drm_atomic_uapi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index e659fdae477d..826cb2212b26 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -463,7 +463,7 @@ static int drm_atomic_crtc_set_property(struct drm_crtc *crtc, return crtc->funcs->atomic_set_property(crtc, state, property, val); } else { drm_dbg_atomic(crtc->dev, - "[CRTC:%d:%s] unknown property [PROP:%d:%s]]\n", + "[CRTC:%d:%s] unknown property [PROP:%d:%s]\n", crtc->base.id, crtc->name, property->base.id, property->name); return -EINVAL; @@ -586,7 +586,7 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, property, val); } else { drm_dbg_atomic(plane->dev, - "[PLANE:%d:%s] unknown property [PROP:%d:%s]]\n", + "[PLANE:%d:%s] unknown property [PROP:%d:%s]\n", plane->base.id, plane->name, property->base.id, property->name); return -EINVAL; @@ -781,7 +781,7 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, state, property, val); } else { drm_dbg_atomic(connector->dev, - "[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]]\n", + "[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]\n", connector->base.id, connector->name, property->base.id, property->name); return -EINVAL; From patchwork Wed Oct 19 14:37:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13011874 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36BC5C433FE for ; Wed, 19 Oct 2022 14:38:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B17110F244; Wed, 19 Oct 2022 14:38:15 +0000 (UTC) Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id C008210F259 for ; Wed, 19 Oct 2022 14:38:04 +0000 (UTC) Date: Wed, 19 Oct 2022 14:37:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1666190283; x=1666449483; bh=PDxabIOW9zboILGrHVwtaZSKqlTEi/EeacCbHYBWwm0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=EVqglfItFfSyWz9tFM17Xvidg8Tv49Cq12CnXH1MAcgTMgjkrNUe32uA1hMzWIzr8 nH55kLLYE57DkJv/6BSw8MQ8Ctcuw+fBD6RYv0O24qMugzQwGiWClYRYJz4lT5qWL1 KjLjf78HWCh2CUu4yC+bZVIHSPE8CKSZ3IWM0fH5YCzhROpkjU67eB1D2uX1tVCeEO 3wRMMmZb4BhwU0cXYeL1CZJiYMYJOTrk+LlaR1w/559WilyOioNaWd6YckukJDM8LD jJLmA+5xhhPggxQ4iqTanmBUR0lY/AGAu9KK4qktJGSZdLLz6sJIc0pbDhYUUGxnAl aT39t8c68s8RQ== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 3/7] drm/atomic: log when getting/setting unknown properties Message-ID: <20221019143736.267324-3-contact@emersion.fr> In-Reply-To: <20221019143736.267324-1-contact@emersion.fr> References: <20221019143736.267324-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Jani Nikula --- drivers/gpu/drm/drm_atomic_uapi.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 826cb2212b26..39f3f491c148 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -498,8 +498,13 @@ drm_atomic_crtc_get_property(struct drm_crtc *crtc, *val = state->scaling_filter; else if (crtc->funcs->atomic_get_property) return crtc->funcs->atomic_get_property(crtc, state, property, val); - else + else { + drm_dbg_atomic(dev, + "[CRTC:%d:%s] unknown property [PROP:%d:%s]\n", + crtc->base.id, crtc->name, + property->base.id, property->name); return -EINVAL; + } return 0; } @@ -645,6 +650,10 @@ drm_atomic_plane_get_property(struct drm_plane *plane, } else if (plane->funcs->atomic_get_property) { return plane->funcs->atomic_get_property(plane, state, property, val); } else { + drm_dbg_atomic(dev, + "[PLANE:%d:%s] unknown property [PROP:%d:%s]\n", + plane->base.id, plane->name, + property->base.id, property->name); return -EINVAL; } @@ -861,6 +870,10 @@ drm_atomic_connector_get_property(struct drm_connector *connector, return connector->funcs->atomic_get_property(connector, state, property, val); } else { + drm_dbg_atomic(dev, + "[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]\n", + connector->base.id, connector->name, + property->base.id, property->name); return -EINVAL; } @@ -899,6 +912,7 @@ int drm_atomic_get_property(struct drm_mode_object *obj, break; } default: + drm_dbg_atomic(dev, "[OBJECT:%d] has no properties\n", obj->id); ret = -EINVAL; break; } @@ -1035,6 +1049,7 @@ int drm_atomic_set_property(struct drm_atomic_state *state, break; } default: + drm_dbg_atomic(prop->dev, "[OBJECT:%d] has no properties\n", obj->id); ret = -EINVAL; break; } From patchwork Wed Oct 19 14:38:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13011878 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D7C8C4332F for ; Wed, 19 Oct 2022 14:38:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5632010EAFA; Wed, 19 Oct 2022 14:38:38 +0000 (UTC) Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) by gabe.freedesktop.org (Postfix) with ESMTPS id AEBDE10F246 for ; Wed, 19 Oct 2022 14:38:15 +0000 (UTC) Date: Wed, 19 Oct 2022 14:38:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1666190294; x=1666449494; bh=AJ/NhkKI17Ftil+Sy94WvvfneYSB2CFlvcaabqi8NjY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=fAqjS9KF+nV2DKrSKTp03jcytUjhsoRbeqy4UK3QGxzKlzg7wH4tJJ49u8BbnYiu7 VzQwovnTyj244NxclseYSjMrLX+SigvVQYkZRq1llKb3e151vdpeHzmdEjo2hpmY7b 59CF6AVZsrh0Mc5DELSgdprESa/dfnrAALFQp9+TgE9hcyTCABlEE77dBOYTe0rKw8 A2iyLi/KmEnjfLvwgwsFrL//NY4du1IW4YDT6J6u+r/fIULs9Vb0PecG6EURLqI5/b dV4WGtO+gOZB+/QPTpr0V5VMYYZYuv5QIgxwhbLqU5yZ31SZXzQy9jUdIgLciv3FXm hc2AjrbKVsgHw== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 4/7] drm/atomic: log when CRTC_ID prop value is invalid Message-ID: <20221019143736.267324-4-contact@emersion.fr> In-Reply-To: <20221019143736.267324-1-contact@emersion.fr> References: <20221019143736.267324-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Jani Nikula --- drivers/gpu/drm/drm_atomic_uapi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 39f3f491c148..5aa2ecd1af3d 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -539,8 +539,12 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, } else if (property == config->prop_crtc_id) { struct drm_crtc *crtc = drm_crtc_find(dev, file_priv, val); - if (val && !crtc) + if (val && !crtc) { + drm_dbg_atomic(dev, + "[PROP:%d:%s] cannot find CRTC with ID %llu\n", + property->base.id, property->name, val); return -EACCES; + } return drm_atomic_set_crtc_for_plane(state, crtc); } else if (property == config->prop_crtc_x) { state->crtc_x = U642I64(val); @@ -695,8 +699,12 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, if (property == config->prop_crtc_id) { struct drm_crtc *crtc = drm_crtc_find(dev, file_priv, val); - if (val && !crtc) + if (val && !crtc) { + drm_dbg_atomic(dev, + "[PROP:%d:%s] cannot find CRTC with ID %llu\n", + property->base.id, property->name, val); return -EACCES; + } return drm_atomic_set_crtc_for_connector(state, crtc); } else if (property == config->dpms_property) { /* setting DPMS property requires special handling, which From patchwork Wed Oct 19 14:38:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13011877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2ABDC433FE for ; Wed, 19 Oct 2022 14:38:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A77D10EAFC; Wed, 19 Oct 2022 14:38:38 +0000 (UTC) Received: from mail-4018.proton.ch (mail-4018.proton.ch [185.70.40.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62BF110F247 for ; Wed, 19 Oct 2022 14:38:22 +0000 (UTC) Date: Wed, 19 Oct 2022 14:38:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1666190300; x=1666449500; bh=I9tuRnrzizTW31WbnBmd5nJoUIiN4Xr2GQvfI4Kvrzw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=Hmb0S/6b9Z4pJPhktzQpCxG7Plv3Qdsc9X50CnToTmeM+ZE6Qp+31KRsRU11YwTEA rHoQRftUm/I1iq5qNUVNm1mS4wFqs49X2MrGayNhd27B6sZKLlstO44V0OXzagcSmQ TYdj5Q/j9BYjgPAWnygqUDeJ+Zw6QoOVN27f4Grqw1GLepmxhWEVLFMnn8ZkWdj1lC VTmik/ybSVCgyezyWr4/n8x7BZaKqsgK/eB/2T4FsBRibEpmqM8BB2khglxNZyLY7u 9BsUS/2Ioiy4zGwf2hbHt1mxMptjIFaKUmhbznh3jF8uo4yvYuXcB+NkwhEi9nDkBB 644VyaQk/Esgw== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 5/7] drm/atomic: log on attempt to set legacy DPMS property Message-ID: <20221019143736.267324-5-contact@emersion.fr> In-Reply-To: <20221019143736.267324-1-contact@emersion.fr> References: <20221019143736.267324-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Jani Nikula --- drivers/gpu/drm/drm_atomic_uapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 5aa2ecd1af3d..3df3f7ba0af3 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -711,6 +711,9 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, * is done in legacy setprop path for us. Disallow (for * now?) atomic writes to DPMS property: */ + drm_dbg_atomic(dev, + "legacy [PROP:%d:%s] can only be set via legacy uAPI\n", + property->base.id, property->name); return -EINVAL; } else if (property == config->tv_select_subconnector_property) { state->tv.select_subconnector = val; From patchwork Wed Oct 19 14:38:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13011876 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E8B7C43219 for ; Wed, 19 Oct 2022 14:38:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E88C10EAF8; Wed, 19 Oct 2022 14:38:37 +0000 (UTC) Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id D5FD110EAF8 for ; Wed, 19 Oct 2022 14:38:28 +0000 (UTC) Date: Wed, 19 Oct 2022 14:38:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1666190307; x=1666449507; bh=AA+aPRXipHH521FkMJp0Bfj9uMGIe6KWk2aFLsIW4sE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=bFpxi4Y77zpDkNxE5InV6UC3AWdjKDmvD7z0Yk7rv0bxq6WllOt4J/YgD1NbC8t8u yFKR/BL46UR1IShWQUENO+TOmtFQ9GG1CTVlVLu6OKuK9srei2IXW9lsPf2GYlO/5b /131iRkmxX7Tlq1Dkq1KzI17rntFAh6Sj/CTMDyb0x8G4JMsqrJ2dIjW4o16a12CQh W3em5r7r2L9O4FRCCfFOGBXoP8aZtRLXznmJnrsjKfi2Vq+iStOuV50Q4rnCy8IKsR APi2pqGoItX0n5Js9O6OFJb7yKPJp4l1mGGRpI5SghyB2dgCfaNQctqxwHFr+4ekaX ciBnp42QBFy+A== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 6/7] drm/atomic: log when page-flip is requested without CRTCs Message-ID: <20221019143736.267324-6-contact@emersion.fr> In-Reply-To: <20221019143736.267324-1-contact@emersion.fr> References: <20221019143736.267324-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Jani Nikula --- drivers/gpu/drm/drm_atomic_uapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 3df3f7ba0af3..b996351beb57 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -1261,8 +1261,10 @@ static int prepare_signaling(struct drm_device *dev, * Having this flag means user mode pends on event which will never * reach due to lack of at least one CRTC for signaling */ - if (c == 0 && (arg->flags & DRM_MODE_PAGE_FLIP_EVENT)) + if (c == 0 && (arg->flags & DRM_MODE_PAGE_FLIP_EVENT)) { + drm_dbg_atomic(dev, "need at least one CRTC for DRM_MODE_PAGE_FLIP_EVENT"); return -EINVAL; + } return 0; } From patchwork Wed Oct 19 14:38:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13011879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9907EC4332F for ; Wed, 19 Oct 2022 14:39:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CE1510EAF9; Wed, 19 Oct 2022 14:39:04 +0000 (UTC) Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1329310EAF9 for ; Wed, 19 Oct 2022 14:38:38 +0000 (UTC) Date: Wed, 19 Oct 2022 14:38:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1666190316; x=1666449516; bh=JPUWG2IfP44W0EAKPYUg/6hM4CLQ9vdjk+OtIUIpV3M=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=JOmAHr0N8VNtieBkYVyZeCrTxusBjJ00q/IYuNzUS1U+zM6DMUyh35hi5Ii95/dUn lYd+S/7AkfDLP0VcIwIzzIqK5tTyyBEofPJYyz9NkhFJTcjgFd+1l/kpZOEJv5Bj0U 7F10M03EWxQobFfensJJYeGeCLYSwD+v6FK+pl5I/qp9faOplixzRAeuqS4AEevTC8 QQZxM8kXx1xgb4FRAC2cmKVmLSEpF1QRwh4E55LYO75K7BNAsKgSp/DSUZqplb18kD 5m73PrIH0vWHvjQhWzKthDy6kQ3N3jA9AtkUGiGxkTiTAq39bRoxviFUXGgLOfQr4E qvqiikkqKOscw== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 7/7] drm/atomic: log errors in drm_mode_atomic_ioctl() Message-ID: <20221019143736.267324-7-contact@emersion.fr> In-Reply-To: <20221019143736.267324-1-contact@emersion.fr> References: <20221019143736.267324-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Jani Nikula --- drivers/gpu/drm/drm_atomic_uapi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index b996351beb57..eb18ab4e6ef8 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -1397,11 +1397,13 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, obj = drm_mode_object_find(dev, file_priv, obj_id, DRM_MODE_OBJECT_ANY); if (!obj) { + drm_dbg_atomic(dev, "cannot find object ID %d", obj_id); ret = -ENOENT; goto out; } if (!obj->properties) { + drm_dbg_atomic(dev, "[OBJECT:%d] has no properties", obj_id); drm_mode_object_put(obj); ret = -ENOENT; goto out; @@ -1428,6 +1430,9 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, prop = drm_mode_obj_find_prop_id(obj, prop_id); if (!prop) { + drm_dbg_atomic(dev, + "[OBJECT:%d] cannot find property ID %d", + obj_id, prop_id); drm_mode_object_put(obj); ret = -ENOENT; goto out;