Skip to contentSkip to conversation

drm/msm: Fix compil issue when DRM_MSM_FBDEV is disabled

PATCH In review Stephane Viau 3 participants 5 messages May 6, 2015 – May 7, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm: Fix compil issue when DRM_MSM_FBDEV is disabled

When CONFIG_DRM_MSM_FBDEV is not defined, CONFIG_DRM_KMS_FB_HELPER does not get selected and drm_fb_helper_*() helper functions are thus not available.

This change fixes these link issues.

---
 drivers/gpu/drm/msm/msm_drv.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/msm/msm_drv.c +4 -0
index 2b1218c..35380ec 100644
@@ -21,9 +21,11 @@
 
 static void msm_fb_output_poll_changed(struct drm_device *dev)
 {
+#ifdef DRM_MSM_FBDEV
 	struct msm_drm_private *priv = dev->dev_private;
 	if (priv->fbdev)
 		drm_fb_helper_hotplug_event(priv->fbdev);
+#endif
 }
 
 static const struct drm_mode_config_funcs mode_config_funcs = {
@@ -419,9 +421,11 @@ static void msm_preclose(struct drm_device *dev, struct drm_file *file)
 
 static void msm_lastclose(struct drm_device *dev)
 {
+#ifdef DRM_MSM_FBDEV
 	struct msm_drm_private *priv = dev->dev_private;
 	if (priv->fbdev)
 		drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
+#endif
 }
 
 static irqreturn_t msm_irq(int irq, void *arg)
Signature · 8 lines
Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 5 lines · Stephane Viau

When CONFIG_DRM_MSM_FBDEV is not defined, CONFIG_DRM_KMS_FB_HELPER does not get selected and drm_fb_helper_*() helper functions are thus not available.

This change fixes these link issues.

Hmm, didn't Archit start on making fbdev config option global and adding nop-stubs for the case that it was disabled? I lost track of where that was going..

BR,
-R

Quoted 36 lines
---
 drivers/gpu/drm/msm/msm_drv.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/msm/msm_drv.c +4 -1
index 2b1218c..35380ec 100644
@@ -21,9 +21,11 @@
 
 static void msm_fb_output_poll_changed(struct drm_device *dev)
 {
+#ifdef DRM_MSM_FBDEV
        struct msm_drm_private *priv = dev->dev_private;
        if (priv->fbdev)
                drm_fb_helper_hotplug_event(priv->fbdev);
+#endif
 }
 
 static const struct drm_mode_config_funcs mode_config_funcs = {
@@ -419,9 +421,11 @@ static void msm_preclose(struct drm_device *dev, struct drm_file *file)
 
 static void msm_lastclose(struct drm_device *dev)
 {
+#ifdef DRM_MSM_FBDEV
        struct msm_drm_private *priv = dev->dev_private;
        if (priv->fbdev)
                drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
+#endif
 }
 
 static irqreturn_t msm_irq(int irq, void *arg)
--

Qualcomm Innovation Center, Inc.

Quoted 2 lines

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 7 lines
Quoted 4 lines · Stephane Viau

When CONFIG_DRM_MSM_FBDEV is not defined, CONFIG_DRM_KMS_FB_HELPER does not get selected and drm_fb_helper_*() helper functions are thus not available.

Quoted 5 lines
Quoted 1 line

This change fixes these link issues.

Hmm, didn't Archit start on making fbdev config option global and adding nop-stubs for the case that it was disabled? I lost track of where that was going..

Oh right... https://lkml.org/lkml/2015/2/23/99
I'll take my patch back then ;-)

Thanks,
Stephane.

Quoted 51 lines

BR,
-R

Quoted 38 lines
---
 drivers/gpu/drm/msm/msm_drv.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/msm/msm_drv.c +4 -0
index 2b1218c..35380ec 100644
@@ -21,9 +21,11 @@
 
 static void msm_fb_output_poll_changed(struct drm_device *dev)
 {
+#ifdef DRM_MSM_FBDEV
        struct msm_drm_private *priv = dev->dev_private;
        if (priv->fbdev)
                drm_fb_helper_hotplug_event(priv->fbdev);
+#endif
 }
 
 static const struct drm_mode_config_funcs mode_config_funcs = {
@@ -419,9 +421,11 @@ static void msm_preclose(struct drm_device *dev,
 struct drm_file *file)
 
 static void msm_lastclose(struct drm_device *dev)
 {
+#ifdef DRM_MSM_FBDEV
        struct msm_drm_private *priv = dev->dev_private;
        if (priv->fbdev)
                drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
+#endif
 }
 

static irqreturn_t msm_irq(int irq, void *arg)
--
Qualcomm Innovation Center, Inc.

Quoted 3 lines

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 9 lines
Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw
In reply to Rob Clark

Hi,

Quoted 10 lines · Rob Clark
Quoted 5 lines · Stephane Viau

When CONFIG_DRM_MSM_FBDEV is not defined, CONFIG_DRM_KMS_FB_HELPER does not get selected and drm_fb_helper_*() helper functions are thus not available.

This change fixes these link issues.

Hmm, didn't Archit start on making fbdev config option global and adding nop-stubs for the case that it was disabled? I lost track of where that was going..

Daniel and I had thought of a possible solution. I had started working on it, but it's still work in progress. It required more things to do than originally thought of.

I don't know if that work will make it in time for 4.2. Maybe we could pull this for the time being?

Archit

Quoted 47 lines

BR,
-R

Quoted 36 lines
---
  drivers/gpu/drm/msm/msm_drv.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/msm/msm_drv.c +4 -1
index 2b1218c..35380ec 100644
@@ -21,9 +21,11 @@
 
  static void msm_fb_output_poll_changed(struct drm_device *dev)
  {
+#ifdef DRM_MSM_FBDEV
         struct msm_drm_private *priv = dev->dev_private;
         if (priv->fbdev)
                 drm_fb_helper_hotplug_event(priv->fbdev);
+#endif
  }
 
  static const struct drm_mode_config_funcs mode_config_funcs = {
@@ -419,9 +421,11 @@ static void msm_preclose(struct drm_device *dev, struct drm_file *file)
 
  static void msm_lastclose(struct drm_device *dev)
  {
+#ifdef DRM_MSM_FBDEV
         struct msm_drm_private *priv = dev->dev_private;
         if (priv->fbdev)
                 drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
+#endif
  }
 
  static irqreturn_t msm_irq(int irq, void *arg)
--

Qualcomm Innovation Center, Inc.

Quoted 2 lines

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw
Quoted 19 lines · Archit Taneja

Hi,

Quoted 8 lines · Rob Clark
Quoted 5 lines · Stephane Viau

When CONFIG_DRM_MSM_FBDEV is not defined, CONFIG_DRM_KMS_FB_HELPER does not get selected and drm_fb_helper_*() helper functions are thus not available.

Quoted 6 lines
Quoted 1 line

This change fixes these link issues.

Hmm, didn't Archit start on making fbdev config option global and adding nop-stubs for the case that it was disabled? I lost track of where that was going..

Quoted 6 lines

Daniel and I had thought of a possible solution. I had started working on it, but it's still work in progress. It required more things to do than originally thought of.

I don't know if that work will make it in time for 4.2. Maybe we could pull this for the time being?

Ok, then I'll pull in this change for the time being..

BR,
-R

Quoted 54 lines

Archit

Quoted 42 lines

BR,
-R

Quoted 38 lines
---
  drivers/gpu/drm/msm/msm_drv.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/msm/msm_drv.c +4 -0
index 2b1218c..35380ec 100644
@@ -21,9 +21,11 @@
 
  static void msm_fb_output_poll_changed(struct drm_device *dev)
  {
+#ifdef DRM_MSM_FBDEV
         struct msm_drm_private *priv = dev->dev_private;
         if (priv->fbdev)
                 drm_fb_helper_hotplug_event(priv->fbdev);
+#endif
  }
 
  static const struct drm_mode_config_funcs mode_config_funcs = {
@@ -419,9 +421,11 @@ static void msm_preclose(struct drm_device *dev,
 struct drm_file *file)
 
  static void msm_lastclose(struct drm_device *dev)
  {
+#ifdef DRM_MSM_FBDEV
         struct msm_drm_private *priv = dev->dev_private;
         if (priv->fbdev)
                 drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
+#endif
  }
 

static irqreturn_t msm_irq(int irq, void *arg)
--
Qualcomm Innovation Center, Inc.

Quoted 9 lines
Quoted 3 lines

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 4 lines

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,

a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel