From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Rob Clark <robdclark@gmail.com>, dri-devel@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
Rob Clark <robdclark@chromium.org>, Sean Paul <sean@poorly.run>,
Konrad Dybcio <konradybcio@kernel.org>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/msm: UAPI error reporting
Date: Fri, 22 Nov 2024 13:21:44 +0100 [thread overview]
Message-ID: <54601d79-4156-41f4-b1b7-250c5c970641@oss.qualcomm.com> (raw)
In-Reply-To: <20241121164858.457921-1-robdclark@gmail.com>
On 21.11.2024 5:48 PM, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> Debugging incorrect UAPI usage tends to be a bit painful, so add a
> helper macro to make it easier to add debug logging which can be enabled
> at runtime via drm.debug.
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
[...]
> +/* Helper for returning a UABI error with optional logging which can make
> + * it easier for userspace to understand what it is doing wrong.
> + */
> +#define UERR(err, drm, fmt, ...) \
> + ({ DRM_DEV_DEBUG_DRIVER((drm)->dev, fmt, ##__VA_ARGS__); -(err); })
> +
> #define DBG(fmt, ...) DRM_DEBUG_DRIVER(fmt"\n", ##__VA_ARGS__)
> #define VERB(fmt, ...) if (0) DRM_DEBUG_DRIVER(fmt"\n", ##__VA_ARGS__)
I'm generally not a fan of adding driver-specific debug prints..
Maybe that's something that could be pushed to the drm-common layer
or even deeper down the stack?
Konrad
next prev parent reply other threads:[~2024-11-22 12:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 16:48 [PATCH] drm/msm: UAPI error reporting Rob Clark
2024-11-22 12:21 ` Konrad Dybcio [this message]
2024-11-22 15:51 ` Rob Clark
2024-11-23 0:19 ` Konrad Dybcio
2024-11-23 2:41 ` Rob Clark
2024-12-13 13:11 ` Konrad Dybcio
2024-12-13 15:55 ` Rob Clark
2024-12-13 16:20 ` Konrad Dybcio
2024-12-31 11:55 ` Tvrtko Ursulin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54601d79-4156-41f4-b1b7-250c5c970641@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox