• yakui_zhao's avatar
    drm: add separate drm debugging levels · 4fefcb27
    yakui_zhao authored
    Now all the DRM debug info will be reported if the boot option of
    "drm.debug=1" is added. Sometimes it is inconvenient to get the debug
    info in KMS mode. We will get too much unrelated info.
    This will separate several DRM debug levels and the debug level can be used
    to print the different debug info. And the debug level is controlled by the
    module parameter of drm.debug
    In this patch it is divided into four debug levels;
           	drm_core, drm_driver, drm_kms, drm_mode.
    At the same time we can get the different debug info by changing the debug
    level. This can be done by adding the module parameter. Of course it can
    be changed through the /sys/module/drm/parameters/debug after the system is
    Four debug macro definitions are provided.
    	DRM_DEBUG(fmt, args...)
    	DRM_DEBUG_DRIVER(prefix, fmt, args...)
    	DRM_DEBUG_KMS(prefix, fmt, args...)
    	DRM_DEBUG_MODE(prefix, fmt, args...)
    When the boot option of "drm.debug=4" is added, it will print the debug info
    using DRM_DEBUG_KMS macro definition.
    When the boot option of "drm.debug=6" is added, it will print the debug info
    Sometimes we expect to print the value of an array.
    For example: SDVO command,
    In such case the following four DRM debug macro definitions are added:
    	DRM_LOG(fmt, args...)
    	DRM_LOG_DRIVER(fmt, args...)
    	DRM_LOG_KMS(fmt, args...)
    	DRM_LOG_MODE(fmt, args...)
    Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
drm_stub.c 13 KB