Loading drivers/gpu/drm/msm/Makefile +3 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,6 @@ msm_drm-y := \ sde/sde_connector.o \ sde/sde_color_processing.o \ sde/sde_vbif.o \ sde_dbg.o \ sde_dbg_evtlog.o \ sde_io_util.o \ sde/sde_hw_reg_dma_v1_color_proc.o \ sde/sde_hw_color_proc_v4.o \ Loading @@ -57,6 +55,9 @@ msm_drm-y := \ sde_hdcp_1x.o \ sde_hdcp_2x.o msm_drm-$(CONFIG_DEBUG_FS) += sde_dbg.o \ sde_dbg_evtlog.o \ msm_drm-$(CONFIG_DRM_MSM_HDMI) += hdmi/hdmi.o \ hdmi/hdmi_audio.o \ hdmi/hdmi_bridge.o \ Loading drivers/gpu/drm/msm/msm_drv.c +2 −11 Original line number Diff line number Diff line /* * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * Copyright (C) 2013 Red Hat * Author: Rob Clark <robdclark@gmail.com> * Loading Loading @@ -743,16 +743,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) if (ret) goto fail; priv->debug_root = debugfs_create_dir("debug", ddev->primary->debugfs_root); if (IS_ERR_OR_NULL(priv->debug_root)) { pr_err("debugfs_root create_dir fail, error %ld\n", PTR_ERR(priv->debug_root)); priv->debug_root = NULL; goto fail; } ret = sde_dbg_debugfs_register(priv->debug_root); ret = sde_dbg_debugfs_register(dev); if (ret) { dev_err(dev, "failed to reg sde dbg debugfs: %d\n", ret); goto fail; Loading drivers/gpu/drm/msm/sde/sde_crtc.c +3 −1 Original line number Diff line number Diff line /* * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2013 Red Hat * Author: Rob Clark <robdclark@gmail.com> * Loading Loading @@ -666,6 +666,7 @@ static void _sde_crtc_deinit_events(struct sde_crtc *sde_crtc) return; } #ifdef CONFIG_DEBUG_FS static int _sde_debugfs_fps_status_show(struct seq_file *s, void *data) { struct sde_crtc *sde_crtc; Loading Loading @@ -712,6 +713,7 @@ static int _sde_debugfs_fps_status(struct inode *inode, struct file *file) return single_open(file, _sde_debugfs_fps_status_show, inode->i_private); } #endif static ssize_t set_fps_periodicity(struct device *device, struct device_attribute *attr, const char *buf, size_t count) Loading drivers/gpu/drm/msm/sde_dbg.c +27 −3 Original line number Diff line number Diff line /* Copyright (c) 2009-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2009-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -23,6 +23,7 @@ #include "sde_dbg.h" #include "sde/sde_hw_catalog.h" #include "msm_drv.h" #define SDE_DBG_BASE_MAX 10 Loading Loading @@ -5046,14 +5047,37 @@ static const struct file_operations sde_reg_fops = { .write = sde_dbg_reg_base_reg_write, }; int sde_dbg_debugfs_register(struct dentry *debugfs_root) int sde_dbg_debugfs_register(struct device *dev) { static struct sde_dbg_base *dbg = &sde_dbg_base; struct sde_dbg_reg_base *blk_base; char debug_name[80] = ""; struct dentry *debugfs_root = NULL; struct platform_device *pdev = to_platform_device(dev); struct drm_device *ddev = platform_get_drvdata(pdev); struct msm_drm_private *priv = NULL; if (!debugfs_root) if (!ddev) { pr_err("Invalid drm device node\n"); return -EINVAL; } priv = ddev->dev_private; if (!priv) { pr_err("Invalid msm drm private node\n"); return -EINVAL; } debugfs_root = debugfs_create_dir("debug", ddev->primary->debugfs_root); if (IS_ERR_OR_NULL(debugfs_root)) { pr_err("debugfs_root create_dir fail, error %ld\n", PTR_ERR(debugfs_root)); priv->debug_root = NULL; return -EINVAL; } priv->debug_root = debugfs_root; debugfs_create_file("dbg_ctrl", 0600, debugfs_root, NULL, &sde_dbg_ctrl_fops); Loading drivers/gpu/drm/msm/sde_dbg.h +6 −6 Original line number Diff line number Diff line /* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -252,7 +252,7 @@ int sde_dbg_init(struct device *dev, struct sde_dbg_power_ctrl *power_ctrl); * @debugfs_root: debugfs root in which to create sde debug entries * Returns: 0 or -ERROR */ int sde_dbg_debugfs_register(struct dentry *debugfs_root); int sde_dbg_debugfs_register(struct device *dev); /** * sde_dbg_destroy - destroy the global sde debug facilities Loading Loading @@ -409,7 +409,7 @@ static inline int sde_dbg_init(struct device *dev, return 0; } static inline int sde_dbg_debugfs_register(struct dentry *debugfs_root) static inline int sde_dbg_debugfs_register(struct device *dev) { return 0; } Loading @@ -418,7 +418,7 @@ static inline void sde_dbg_destroy(void) { } static inline void sde_dbg_dump(enum sde_dbg_dump_context, static inline void sde_dbg_dump(enum sde_dbg_dump_context mode, const char *name, ...) { } Loading @@ -439,7 +439,7 @@ static inline void sde_dbg_reg_register_dump_range(const char *base_name, { } void sde_dbg_set_sde_top_offset(u32 blk_off) static inline void sde_dbg_set_sde_top_offset(u32 blk_off) { } Loading @@ -458,7 +458,7 @@ static inline void sde_rsc_debug_dump(u32 mux_sel) { } static inline void dsi_ctrl_debug_dump(u32 entries, u32 size) static inline void dsi_ctrl_debug_dump(u32 *entries, u32 size) { } Loading Loading
drivers/gpu/drm/msm/Makefile +3 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,6 @@ msm_drm-y := \ sde/sde_connector.o \ sde/sde_color_processing.o \ sde/sde_vbif.o \ sde_dbg.o \ sde_dbg_evtlog.o \ sde_io_util.o \ sde/sde_hw_reg_dma_v1_color_proc.o \ sde/sde_hw_color_proc_v4.o \ Loading @@ -57,6 +55,9 @@ msm_drm-y := \ sde_hdcp_1x.o \ sde_hdcp_2x.o msm_drm-$(CONFIG_DEBUG_FS) += sde_dbg.o \ sde_dbg_evtlog.o \ msm_drm-$(CONFIG_DRM_MSM_HDMI) += hdmi/hdmi.o \ hdmi/hdmi_audio.o \ hdmi/hdmi_bridge.o \ Loading
drivers/gpu/drm/msm/msm_drv.c +2 −11 Original line number Diff line number Diff line /* * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * Copyright (C) 2013 Red Hat * Author: Rob Clark <robdclark@gmail.com> * Loading Loading @@ -743,16 +743,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) if (ret) goto fail; priv->debug_root = debugfs_create_dir("debug", ddev->primary->debugfs_root); if (IS_ERR_OR_NULL(priv->debug_root)) { pr_err("debugfs_root create_dir fail, error %ld\n", PTR_ERR(priv->debug_root)); priv->debug_root = NULL; goto fail; } ret = sde_dbg_debugfs_register(priv->debug_root); ret = sde_dbg_debugfs_register(dev); if (ret) { dev_err(dev, "failed to reg sde dbg debugfs: %d\n", ret); goto fail; Loading
drivers/gpu/drm/msm/sde/sde_crtc.c +3 −1 Original line number Diff line number Diff line /* * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2013 Red Hat * Author: Rob Clark <robdclark@gmail.com> * Loading Loading @@ -666,6 +666,7 @@ static void _sde_crtc_deinit_events(struct sde_crtc *sde_crtc) return; } #ifdef CONFIG_DEBUG_FS static int _sde_debugfs_fps_status_show(struct seq_file *s, void *data) { struct sde_crtc *sde_crtc; Loading Loading @@ -712,6 +713,7 @@ static int _sde_debugfs_fps_status(struct inode *inode, struct file *file) return single_open(file, _sde_debugfs_fps_status_show, inode->i_private); } #endif static ssize_t set_fps_periodicity(struct device *device, struct device_attribute *attr, const char *buf, size_t count) Loading
drivers/gpu/drm/msm/sde_dbg.c +27 −3 Original line number Diff line number Diff line /* Copyright (c) 2009-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2009-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -23,6 +23,7 @@ #include "sde_dbg.h" #include "sde/sde_hw_catalog.h" #include "msm_drv.h" #define SDE_DBG_BASE_MAX 10 Loading Loading @@ -5046,14 +5047,37 @@ static const struct file_operations sde_reg_fops = { .write = sde_dbg_reg_base_reg_write, }; int sde_dbg_debugfs_register(struct dentry *debugfs_root) int sde_dbg_debugfs_register(struct device *dev) { static struct sde_dbg_base *dbg = &sde_dbg_base; struct sde_dbg_reg_base *blk_base; char debug_name[80] = ""; struct dentry *debugfs_root = NULL; struct platform_device *pdev = to_platform_device(dev); struct drm_device *ddev = platform_get_drvdata(pdev); struct msm_drm_private *priv = NULL; if (!debugfs_root) if (!ddev) { pr_err("Invalid drm device node\n"); return -EINVAL; } priv = ddev->dev_private; if (!priv) { pr_err("Invalid msm drm private node\n"); return -EINVAL; } debugfs_root = debugfs_create_dir("debug", ddev->primary->debugfs_root); if (IS_ERR_OR_NULL(debugfs_root)) { pr_err("debugfs_root create_dir fail, error %ld\n", PTR_ERR(debugfs_root)); priv->debug_root = NULL; return -EINVAL; } priv->debug_root = debugfs_root; debugfs_create_file("dbg_ctrl", 0600, debugfs_root, NULL, &sde_dbg_ctrl_fops); Loading
drivers/gpu/drm/msm/sde_dbg.h +6 −6 Original line number Diff line number Diff line /* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -252,7 +252,7 @@ int sde_dbg_init(struct device *dev, struct sde_dbg_power_ctrl *power_ctrl); * @debugfs_root: debugfs root in which to create sde debug entries * Returns: 0 or -ERROR */ int sde_dbg_debugfs_register(struct dentry *debugfs_root); int sde_dbg_debugfs_register(struct device *dev); /** * sde_dbg_destroy - destroy the global sde debug facilities Loading Loading @@ -409,7 +409,7 @@ static inline int sde_dbg_init(struct device *dev, return 0; } static inline int sde_dbg_debugfs_register(struct dentry *debugfs_root) static inline int sde_dbg_debugfs_register(struct device *dev) { return 0; } Loading @@ -418,7 +418,7 @@ static inline void sde_dbg_destroy(void) { } static inline void sde_dbg_dump(enum sde_dbg_dump_context, static inline void sde_dbg_dump(enum sde_dbg_dump_context mode, const char *name, ...) { } Loading @@ -439,7 +439,7 @@ static inline void sde_dbg_reg_register_dump_range(const char *base_name, { } void sde_dbg_set_sde_top_offset(u32 blk_off) static inline void sde_dbg_set_sde_top_offset(u32 blk_off) { } Loading @@ -458,7 +458,7 @@ static inline void sde_rsc_debug_dump(u32 mux_sel) { } static inline void dsi_ctrl_debug_dump(u32 entries, u32 size) static inline void dsi_ctrl_debug_dump(u32 *entries, u32 size) { } Loading