Skip to content

Commit

Permalink
drm: msm: Fix build when legacy fbdev support isn't set
Browse files Browse the repository at this point in the history
The DRM_KMS_FB_HELPER config is selected only when DRM_MSM_FBDEV config is
selected. The driver accesses drm_fb_helper_* functions even when legacy fbdev
support is disabled in msm. Wrap around these functions with #ifdef checks to
prevent build break.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
  • Loading branch information
Archit Taneja authored and Rob Clark committed May 14, 2015
1 parent 981371f commit a2ca778
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/msm/msm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@

static void msm_fb_output_poll_changed(struct drm_device *dev)
{
#ifdef CONFIG_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 = {
Expand Down Expand Up @@ -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 CONFIG_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)
Expand Down

0 comments on commit a2ca778

Please sign in to comment.