[12/37] drm/vmwgfx: Populate fb->dev before drm_framebuffer_init()
diff mbox

Message ID 1479498793-31021-13-git-send-email-ville.syrjala@linux.intel.com
State New
Headers show

Commit Message

Ville Syrjälä Nov. 18, 2016, 7:52 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm_framebuffer_init() will start to check that fb->dev is already
populated, so let's to that manually since vmwgfx isn't using
drm_helper_mode_fill_fb_struct().

Cc: linux-graphics-maintainer@vmware.com
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Sinclair Yeh Nov. 21, 2016, 5:10 p.m. UTC | #1
Minor typo below.

Reviewed-by: Sinclair Yeh <syeh@vmware.com>

On Fri, Nov 18, 2016 at 09:52:48PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> drm_framebuffer_init() will start to check that fb->dev is already
> populated, so let's to that manually since vmwgfx isn't using
                      ^
do

> drm_helper_mode_fill_fb_struct().
> 
> Cc: linux-graphics-maintainer@vmware.com
> Cc: Sinclair Yeh <syeh@vmware.com>
> Cc: Thomas Hellstrom <thellstrom@vmware.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> index e3f68cc9bb4b..7d92ab56961b 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> @@ -581,6 +581,7 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv,
>  		goto out_err1;
>  	}
>  
> +	vfbs->base.base.dev = dev;
>  	/* XXX get the first 3 from the surface info */
>  	vfbs->base.base.bits_per_pixel = mode_cmd->bpp;
>  	vfbs->base.base.pitches[0] = mode_cmd->pitch;
> @@ -875,6 +876,7 @@ static int vmw_kms_new_framebuffer_dmabuf(struct vmw_private *dev_priv,
>  		goto out_err1;
>  	}
>  
> +	vfbd->base.base.dev = dev;
>  	vfbd->base.base.bits_per_pixel = mode_cmd->bpp;
>  	vfbd->base.base.pitches[0] = mode_cmd->pitch;
>  	vfbd->base.base.depth = mode_cmd->depth;
> -- 
> 2.7.4
>

Patch
diff mbox

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index e3f68cc9bb4b..7d92ab56961b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -581,6 +581,7 @@  static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv,
 		goto out_err1;
 	}
 
+	vfbs->base.base.dev = dev;
 	/* XXX get the first 3 from the surface info */
 	vfbs->base.base.bits_per_pixel = mode_cmd->bpp;
 	vfbs->base.base.pitches[0] = mode_cmd->pitch;
@@ -875,6 +876,7 @@  static int vmw_kms_new_framebuffer_dmabuf(struct vmw_private *dev_priv,
 		goto out_err1;
 	}
 
+	vfbd->base.base.dev = dev;
 	vfbd->base.base.bits_per_pixel = mode_cmd->bpp;
 	vfbd->base.base.pitches[0] = mode_cmd->pitch;
 	vfbd->base.base.depth = mode_cmd->depth;