diff mbox series

drm/msm: fix display snapshotting if DP or DSI is disabled

Message ID 20210527220330.3364716-1-dmitry.baryshkov@linaro.org
State Accepted
Commit 53e231705e1ceb9cc3be87dc36a50d057e0c8bad
Headers show
Series drm/msm: fix display snapshotting if DP or DSI is disabled | expand

Commit Message

Dmitry Baryshkov May 27, 2021, 10:03 p.m. UTC
Fix following warnings generated when either DP or DSI support is
disabled:

drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c:141:3: error: implicit declaration of function 'msm_dp_snapshot'; did you mean 'msm_dsi_snapshot'? [-Werror=implicit-function-declaration]

drivers/gpu/drm/msm/msm_kms.h:127:26: warning: 'struct msm_disp_state' declared inside parameter list will not be visible outside of this definition or declaration
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:867:21: error: initialization of 'void (*)(struct msm_disp_state *, struct msm_kms *)' from incompatible pointer type 'void (*)(struct msm_disp_state *, struct msm_kms *)' [-Werror=incompatible-pointer-types]
drivers/gpu/drm/msm/dsi/dsi.h:94:30: warning: 'struct msm_disp_state' declared inside parameter list will not be visible outside of this definition or declaration

Reported-by: kernel test robot <lkp@intel.com>
Cc: Abhinav Kumar <abhinavk@codeaurora.org>
Fixes: 1c3b7ac1a71d ("drm/msm: pass dump state as a function argument")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

---
 drivers/gpu/drm/msm/disp/msm_disp_snapshot.h |  1 -
 drivers/gpu/drm/msm/dsi/dsi.h                |  2 --
 drivers/gpu/drm/msm/msm_drv.h                | 12 +++++++++++-
 3 files changed, 11 insertions(+), 4 deletions(-)

-- 
2.30.2

Comments

Abhinav Kumar May 27, 2021, 10:49 p.m. UTC | #1
On 2021-05-27 15:03, Dmitry Baryshkov wrote:
> Fix following warnings generated when either DP or DSI support is

> disabled:

> 

> drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c:141:3: error:

> implicit declaration of function 'msm_dp_snapshot'; did you mean

> 'msm_dsi_snapshot'? [-Werror=implicit-function-declaration]

> 

> drivers/gpu/drm/msm/msm_kms.h:127:26: warning: 'struct msm_disp_state'

> declared inside parameter list will not be visible outside of this

> definition or declaration

> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:867:21: error: initialization

> of 'void (*)(struct msm_disp_state *, struct msm_kms *)' from

> incompatible pointer type 'void (*)(struct msm_disp_state *, struct

> msm_kms *)' [-Werror=incompatible-pointer-types]

> drivers/gpu/drm/msm/dsi/dsi.h:94:30: warning: 'struct msm_disp_state'

> declared inside parameter list will not be visible outside of this

> definition or declaration

> 

> Reported-by: kernel test robot <lkp@intel.com>

> Cc: Abhinav Kumar <abhinavk@codeaurora.org>

> Fixes: 1c3b7ac1a71d ("drm/msm: pass dump state as a function argument")

> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

> ---

>  drivers/gpu/drm/msm/disp/msm_disp_snapshot.h |  1 -

>  drivers/gpu/drm/msm/dsi/dsi.h                |  2 --

>  drivers/gpu/drm/msm/msm_drv.h                | 12 +++++++++++-

>  3 files changed, 11 insertions(+), 4 deletions(-)

> 

> diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h

> b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h

> index c6174a366095..c92a9508c8d3 100644

> --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h

> +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h

> @@ -27,7 +27,6 @@

>  #include <linux/devcoredump.h>

>  #include <stdarg.h>

>  #include "msm_kms.h"

> -#include "dsi.h"

> 

>  #define MSM_DISP_SNAPSHOT_MAX_BLKS		10

> 

> diff --git a/drivers/gpu/drm/msm/dsi/dsi.h 

> b/drivers/gpu/drm/msm/dsi/dsi.h

> index cea73f9c4be9..9b8e9b07eced 100644

> --- a/drivers/gpu/drm/msm/dsi/dsi.h

> +++ b/drivers/gpu/drm/msm/dsi/dsi.h

> @@ -91,8 +91,6 @@ static inline bool msm_dsi_device_connected(struct

> msm_dsi *msm_dsi)

>  	return msm_dsi->panel || msm_dsi->external_bridge;

>  }

> 

> -void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct

> msm_dsi *msm_dsi);

> -

>  struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi);

> 

>  /* dsi host */

> diff --git a/drivers/gpu/drm/msm/msm_drv.h 

> b/drivers/gpu/drm/msm/msm_drv.h

> index c33fc1293789..ba60bf6f124c 100644

> --- a/drivers/gpu/drm/msm/msm_drv.h

> +++ b/drivers/gpu/drm/msm/msm_drv.h

> @@ -43,6 +43,7 @@ struct msm_gem_submit;

>  struct msm_fence_context;

>  struct msm_gem_address_space;

>  struct msm_gem_vma;

> +struct msm_disp_state;

> 

>  #define MAX_CRTCS      8

>  #define MAX_PLANES     20

> @@ -340,6 +341,8 @@ void __init msm_dsi_register(void);

>  void __exit msm_dsi_unregister(void);

>  int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device 

> *dev,

>  			 struct drm_encoder *encoder);

> +void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct

> msm_dsi *msm_dsi);

> +

>  #else

>  static inline void __init msm_dsi_register(void)

>  {

> @@ -353,6 +356,10 @@ static inline int msm_dsi_modeset_init(struct

> msm_dsi *msm_dsi,

>  {

>  	return -EINVAL;

>  }

> +static inline void msm_dsi_snapshot(struct msm_disp_state

> *disp_state, struct msm_dsi *msm_dsi)

> +{

> +}

> +

>  #endif

> 

>  #ifdef CONFIG_DRM_MSM_DP

> @@ -367,7 +374,6 @@ void msm_dp_display_mode_set(struct msm_dp *dp,

> struct drm_encoder *encoder,

>  				struct drm_display_mode *mode,

>  				struct drm_display_mode *adjusted_mode);

>  void msm_dp_irq_postinstall(struct msm_dp *dp_display);

> -struct msm_disp_state;

>  void msm_dp_snapshot(struct msm_disp_state *disp_state, struct msm_dp

> *dp_display);

> 

>  void msm_dp_debugfs_init(struct msm_dp *dp_display, struct drm_minor 

> *minor);

> @@ -412,6 +418,10 @@ static inline void msm_dp_irq_postinstall(struct

> msm_dp *dp_display)

>  {

>  }

> 

> +static inline void msm_dp_snapshot(struct msm_disp_state *disp_state,

> struct msm_dp *dp_display)

> +{

> +}

> +

>  static inline void msm_dp_debugfs_init(struct msm_dp *dp_display,

>  		struct drm_minor *minor)

>  {
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h
index c6174a366095..c92a9508c8d3 100644
--- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h
+++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h
@@ -27,7 +27,6 @@ 
 #include <linux/devcoredump.h>
 #include <stdarg.h>
 #include "msm_kms.h"
-#include "dsi.h"
 
 #define MSM_DISP_SNAPSHOT_MAX_BLKS		10
 
diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h
index cea73f9c4be9..9b8e9b07eced 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.h
+++ b/drivers/gpu/drm/msm/dsi/dsi.h
@@ -91,8 +91,6 @@  static inline bool msm_dsi_device_connected(struct msm_dsi *msm_dsi)
 	return msm_dsi->panel || msm_dsi->external_bridge;
 }
 
-void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi);
-
 struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi);
 
 /* dsi host */
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index c33fc1293789..ba60bf6f124c 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -43,6 +43,7 @@  struct msm_gem_submit;
 struct msm_fence_context;
 struct msm_gem_address_space;
 struct msm_gem_vma;
+struct msm_disp_state;
 
 #define MAX_CRTCS      8
 #define MAX_PLANES     20
@@ -340,6 +341,8 @@  void __init msm_dsi_register(void);
 void __exit msm_dsi_unregister(void);
 int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
 			 struct drm_encoder *encoder);
+void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi);
+
 #else
 static inline void __init msm_dsi_register(void)
 {
@@ -353,6 +356,10 @@  static inline int msm_dsi_modeset_init(struct msm_dsi *msm_dsi,
 {
 	return -EINVAL;
 }
+static inline void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi)
+{
+}
+
 #endif
 
 #ifdef CONFIG_DRM_MSM_DP
@@ -367,7 +374,6 @@  void msm_dp_display_mode_set(struct msm_dp *dp, struct drm_encoder *encoder,
 				struct drm_display_mode *mode,
 				struct drm_display_mode *adjusted_mode);
 void msm_dp_irq_postinstall(struct msm_dp *dp_display);
-struct msm_disp_state;
 void msm_dp_snapshot(struct msm_disp_state *disp_state, struct msm_dp *dp_display);
 
 void msm_dp_debugfs_init(struct msm_dp *dp_display, struct drm_minor *minor);
@@ -412,6 +418,10 @@  static inline void msm_dp_irq_postinstall(struct msm_dp *dp_display)
 {
 }
 
+static inline void msm_dp_snapshot(struct msm_disp_state *disp_state, struct msm_dp *dp_display)
+{
+}
+
 static inline void msm_dp_debugfs_init(struct msm_dp *dp_display,
 		struct drm_minor *minor)
 {