drm: Replace crtc fb with primary plane fb (v3)
[cascardo/linux.git] / drivers / gpu / drm / vmwgfx / vmwgfx_ldu.c
index a055a26..b2b9bd2 100644 (file)
@@ -93,7 +93,7 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
 
                if (crtc == NULL)
                        return 0;
-               fb = entry->base.crtc.fb;
+               fb = entry->base.crtc.primary->fb;
 
                return vmw_kms_write_svga(dev_priv, w, h, fb->pitches[0],
                                          fb->bits_per_pixel, fb->depth);
@@ -101,7 +101,7 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
 
        if (!list_empty(&lds->active)) {
                entry = list_entry(lds->active.next, typeof(*entry), active);
-               fb = entry->base.crtc.fb;
+               fb = entry->base.crtc.primary->fb;
 
                vmw_kms_write_svga(dev_priv, fb->width, fb->height, fb->pitches[0],
                                   fb->bits_per_pixel, fb->depth);
@@ -259,7 +259,7 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)
 
                connector->encoder = NULL;
                encoder->crtc = NULL;
-               crtc->fb = NULL;
+               crtc->primary->fb = NULL;
                crtc->enabled = false;
 
                vmw_ldu_del_active(dev_priv, ldu);
@@ -280,7 +280,7 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)
 
        vmw_fb_off(dev_priv);
 
-       crtc->fb = fb;
+       crtc->primary->fb = fb;
        encoder->crtc = crtc;
        connector->encoder = encoder;
        crtc->x = set->x;