Merge tag 'topic/drm-misc-2016-10-24' of git://anongit.freedesktop.org/drm-intel into drm-next
First -misc pull for 4.10: - drm_format rework from Laurent - reservation patches from Chris that missed 4.9. - aspect ratio support in infoframe helpers and drm mode/edid code (Shashank Sharma) - rotation rework from Ville (first parts at least) - another attempt at the CRC debugfs interface from Tomeu - piles and piles of misc patches all over * tag 'topic/drm-misc-2016-10-24' of git://anongit.freedesktop.org/drm-intel: (55 commits) drm: Use u64 for intermediate dotclock calculations drm/i915: Use the per-plane rotation property drm/omap: Use per-plane rotation property drm/omap: Set rotation property initial value to BIT(DRM_ROTATE_0) insted of 0 drm/atmel-hlcdc: Use per-plane rotation property drm/arm: Use per-plane rotation property drm: Add support for optional per-plane rotation property drm/atomic: Reject attempts to use multiple rotation angles at once drm: Add drm_rotation_90_or_270() dma-buf/sync_file: hold reference to fence when creating sync_file drm/virtio: kconfig: Fixup white space. drm/fence: release fence reference when canceling event drm/i915: Handle early failure during intel_get_load_detect_pipe drm/fb_cma_helper: do not free fbdev if there is none drm: fix sparse warnings on undeclared symbols in crc debugfs gpu: Remove depends on RESET_CONTROLLER when not a provider i915: don't call drm_atomic_state_put on invalid pointer drm: Don't export the drm_fb_get_bpp_depth() function drm/arm: mali-dp: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() drm: vmwgfx: Replace drm_fb_get_bpp_depth() with drm_format_info() ...
This commit is contained in:
@@ -415,5 +415,37 @@ void drm_debugfs_connector_remove(struct drm_connector *connector)
|
||||
connector->debugfs_entry = NULL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
int drm_debugfs_crtc_add(struct drm_crtc *crtc)
|
||||
{
|
||||
struct drm_minor *minor = crtc->dev->primary;
|
||||
struct dentry *root;
|
||||
char *name;
|
||||
|
||||
name = kasprintf(GFP_KERNEL, "crtc-%d", crtc->index);
|
||||
if (!name)
|
||||
return -ENOMEM;
|
||||
|
||||
root = debugfs_create_dir(name, minor->debugfs_root);
|
||||
kfree(name);
|
||||
if (!root)
|
||||
return -ENOMEM;
|
||||
|
||||
crtc->debugfs_entry = root;
|
||||
|
||||
if (drm_debugfs_crtc_crc_add(crtc))
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
drm_debugfs_crtc_remove(crtc);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
void drm_debugfs_crtc_remove(struct drm_crtc *crtc)
|
||||
{
|
||||
debugfs_remove_recursive(crtc->debugfs_entry);
|
||||
crtc->debugfs_entry = NULL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
|
Reference in New Issue
Block a user