diff mbox series

drm/msm: Fix undefined "rd_full" link error

Message ID 20200430192427.4104899-1-bjorn.andersson@linaro.org
State Accepted
Commit 20aebe83698feb107d5a66b6cfd1d54459ccdfcf
Headers show
Series drm/msm: Fix undefined "rd_full" link error | expand

Commit Message

Bjorn Andersson April 30, 2020, 7:24 p.m. UTC
rd_full should be defined outside the CONFIG_DEBUG_FS region, in order
to be able to link the msm driver even when CONFIG_DEBUG_FS is disabled.

Fixes: e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

---
 drivers/gpu/drm/msm/msm_rd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.24.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Comments

Rob Clark May 1, 2020, 6:07 p.m. UTC | #1
On Thu, Apr 30, 2020 at 12:25 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>

> rd_full should be defined outside the CONFIG_DEBUG_FS region, in order

> to be able to link the msm driver even when CONFIG_DEBUG_FS is disabled.

>

> Fixes: e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers")

> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>


thanks,

Reviewed-by: Rob Clark <robdclark@gmail.com>


> ---

>  drivers/gpu/drm/msm/msm_rd.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

>

> diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c

> index 732f65df5c4f..fea30e7aa9e8 100644

> --- a/drivers/gpu/drm/msm/msm_rd.c

> +++ b/drivers/gpu/drm/msm/msm_rd.c

> @@ -29,8 +29,6 @@

>   * or shader programs (if not emitted inline in cmdstream).

>   */

>

> -#ifdef CONFIG_DEBUG_FS

> -

>  #include <linux/circ_buf.h>

>  #include <linux/debugfs.h>

>  #include <linux/kfifo.h>

> @@ -47,6 +45,8 @@ bool rd_full = false;

>  MODULE_PARM_DESC(rd_full, "If true, $debugfs/.../rd will snapshot all buffer contents");

>  module_param_named(rd_full, rd_full, bool, 0600);

>

> +#ifdef CONFIG_DEBUG_FS

> +

>  enum rd_sect_type {

>         RD_NONE,

>         RD_TEST,       /* ascii text */

> --

> 2.24.0

>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Stephen Rothwell May 3, 2020, 10:32 p.m. UTC | #2
Hi all,

On Thu, 30 Apr 2020 12:24:27 -0700 Bjorn Andersson <bjorn.andersson@linaro.org> wrote:
>

> rd_full should be defined outside the CONFIG_DEBUG_FS region, in order

> to be able to link the msm driver even when CONFIG_DEBUG_FS is disabled.

> 

> Fixes: e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers")

> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---

>  drivers/gpu/drm/msm/msm_rd.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c

> index 732f65df5c4f..fea30e7aa9e8 100644

> --- a/drivers/gpu/drm/msm/msm_rd.c

> +++ b/drivers/gpu/drm/msm/msm_rd.c

> @@ -29,8 +29,6 @@

>   * or shader programs (if not emitted inline in cmdstream).

>   */

>  

> -#ifdef CONFIG_DEBUG_FS

> -

>  #include <linux/circ_buf.h>

>  #include <linux/debugfs.h>

>  #include <linux/kfifo.h>

> @@ -47,6 +45,8 @@ bool rd_full = false;

>  MODULE_PARM_DESC(rd_full, "If true, $debugfs/.../rd will snapshot all buffer contents");

>  module_param_named(rd_full, rd_full, bool, 0600);

>  

> +#ifdef CONFIG_DEBUG_FS

> +

>  enum rd_sect_type {

>  	RD_NONE,

>  	RD_TEST,       /* ascii text */

> -- 

> 2.24.0

> 


Added to my fixes tree form today.  I will remove it when it is merged
upstream through someone else's tree.

-- 
Cheers,
Stephen Rothwell
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c
index 732f65df5c4f..fea30e7aa9e8 100644
--- a/drivers/gpu/drm/msm/msm_rd.c
+++ b/drivers/gpu/drm/msm/msm_rd.c
@@ -29,8 +29,6 @@ 
  * or shader programs (if not emitted inline in cmdstream).
  */
 
-#ifdef CONFIG_DEBUG_FS
-
 #include <linux/circ_buf.h>
 #include <linux/debugfs.h>
 #include <linux/kfifo.h>
@@ -47,6 +45,8 @@  bool rd_full = false;
 MODULE_PARM_DESC(rd_full, "If true, $debugfs/.../rd will snapshot all buffer contents");
 module_param_named(rd_full, rd_full, bool, 0600);
 
+#ifdef CONFIG_DEBUG_FS
+
 enum rd_sect_type {
 	RD_NONE,
 	RD_TEST,       /* ascii text */