mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-02-03 16:24:24 +00:00
In the logging code, we are currently checking is we need to output in
drm_ut_debug_printk(). This is too late. The problem is that when we write
something like:
DRM_DEBUG_DRIVER("ELD on [CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
connector->base.id,
drm_get_connector_name(connector),
connector->encoder->base.id,
drm_get_encoder_name(connector->encoder));
We start by evaluating the arguments (so call drm_get_connector_name() and
drm_get_connector_name()) before ending up in drm_ut_debug_printk() which will
then does nothing.
This means we execute a lot of instructions (drm_get_connector_name(), in turn,
calls snprintf() for example) to happily discard them in the normal case,
drm.debug=0.
So, let's put the test on drm_debug earlier, in the macros themselves.
Sprinkle an unlikely() as well for good measure.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||
|---|---|---|
| .. | ||
| bridge | ||
| i2c | ||
| ttm | ||
| drm_agpsupport.h | ||
| drm_buffer.h | ||
| drm_cache.h | ||
| drm_core.h | ||
| drm_crtc_helper.h | ||
| drm_crtc.h | ||
| drm_dp_helper.h | ||
| drm_edid.h | ||
| drm_encoder_slave.h | ||
| drm_fb_cma_helper.h | ||
| drm_fb_helper.h | ||
| drm_fixed.h | ||
| drm_flip_work.h | ||
| drm_gem_cma_helper.h | ||
| drm_global.h | ||
| drm_hashtab.h | ||
| drm_mem_util.h | ||
| drm_memory.h | ||
| drm_mipi_dsi.h | ||
| drm_mm.h | ||
| drm_modes.h | ||
| drm_os_linux.h | ||
| drm_panel.h | ||
| drm_pciids.h | ||
| drm_rect.h | ||
| drm_sysfs.h | ||
| drm_usb.h | ||
| drm_vma_manager.h | ||
| drmP.h | ||
| exynos_drm.h | ||
| gma_drm.h | ||
| i915_drm.h | ||
| i915_pciids.h | ||
| i915_powerwell.h | ||
| intel-gtt.h | ||