[Intel-gfx] [PATCH 2/2] [DRM]: Use the DRM_DEBUG_MODE to add the debug info for generic DRM modes
Zhenyu Wang
zhenyuw at linux.intel.com
Fri Jul 10 05:37:49 CEST 2009
On 2009.07.10 08:53:13 +0800, yakui.zhao at intel.com wrote:
> From: Zhao Yakui <yakui.zhao at intel.com>
>
> Use the DRM_DEBUG_MODE to add the debug info in generic DRM modes
>
> Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
> ---
> drivers/gpu/drm/drm_crtc.c | 36 +++++++++++++-------
> drivers/gpu/drm/drm_crtc_helper.c | 65 ++++++++++++++++++++++--------------
> 2 files changed, 63 insertions(+), 38 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 8fab789..181a9a9 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -34,6 +34,8 @@
> #include "drmP.h"
> #include "drm_crtc.h"
>
> +#define DRM_CRTC "drm_crtc"
> +
> struct drm_prop_enum_list {
> int type;
> char *name;
> @@ -1060,7 +1062,8 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
> if (file_priv->master->minor->type == DRM_MINOR_CONTROL) {
> list_for_each_entry(crtc, &dev->mode_config.crtc_list,
> head) {
> - DRM_DEBUG("CRTC ID is %d\n", crtc->base.id);
> + DRM_DEBUG_MODE(DRM_CRTC,
> + "CRTC ID is %d\n", crtc->base.id);
> if (put_user(crtc->base.id, crtc_id + copied)) {
> ret = -EFAULT;
> goto out;
One thing I found inconvenient for new drm debug functions is I have to decide
the prefix thing, but not default 'drm' as before. I'm not sure if the required
prefix string is better or not...
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090710/af16b353/attachment.sig>
More information about the Intel-gfx
mailing list