Lines Matching refs:fb

1869 static int i9xx_update_plane(struct drm_crtc *crtc, struct drm_framebuffer *fb,
1891 intel_fb = to_intel_framebuffer(fb);
1898 switch (fb->pixel_format) {
1926 DRM_ERROR("Unknown pixel format 0x%08x\n", fb->pixel_format);
1942 linear_offset = y * fb->pitches[0] + x * (fb->bits_per_pixel / 8);
1947 fb->bits_per_pixel / 8,
1948 fb->pitches[0]);
1955 obj->gtt_offset, linear_offset, x, y, fb->pitches[0]);
1956 I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]);
1970 struct drm_framebuffer *fb, int x, int y)
1992 intel_fb = to_intel_framebuffer(fb);
1999 switch (fb->pixel_format) {
2023 DRM_ERROR("Unknown pixel format 0x%08x\n", fb->pixel_format);
2037 linear_offset = y * fb->pitches[0] + x * (fb->bits_per_pixel / 8);
2040 fb->bits_per_pixel / 8,
2041 fb->pitches[0]);
2045 obj->gtt_offset, linear_offset, x, y, fb->pitches[0]);
2046 I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]);
2060 /* Assume fb object is pinned & idle & fenced and just update base pointers */
2062 intel_pipe_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb,
2072 return dev_priv->display.update_plane(crtc, fb, x, y);
2086 * planes to the the last fb to make sure we're
2087 * showing the correct fb after a reset.
2107 dev_priv->display.update_plane(crtc, crtc->fb,
2165 struct drm_framebuffer *fb)
2173 /* no fb bound */
2174 if (!fb) {
2188 to_intel_framebuffer(fb)->obj,
2196 ret = dev_priv->display.update_plane(crtc, fb, x, y);
2198 intel_unpin_fb_obj(to_intel_framebuffer(fb)->obj);
2204 old_fb = crtc->fb;
2205 crtc->fb = fb;
2210 if (intel_crtc->active && old_fb != fb)
2792 if (crtc->fb == NULL)
2801 intel_finish_fb(crtc->fb);
3815 if (crtc->fb) {
3817 intel_unpin_fb_obj(to_intel_framebuffer(crtc->fb)->obj);
3819 crtc->fb = NULL;
4849 struct drm_framebuffer *fb)
4953 ret = intel_pipe_set_base(crtc, x, y, fb);
5700 struct drm_framebuffer *fb)
5828 ret = intel_pipe_set_base(crtc, x, y, fb);
5949 struct drm_framebuffer *fb)
5983 ret = intel_pipe_set_base(crtc, x, y, fb);
6064 struct drm_framebuffer *fb)
6079 ret = dev_priv->display.crtc_mode_set(crtc, x, y, fb);
6498 if (on && crtc->enabled && crtc->fb) {
6500 if (x > (int) crtc->fb->width)
6503 if (y > (int) crtc->fb->height)
6779 struct drm_framebuffer *fb;
6788 fb = &dev_priv->fbdev->ifb.base;
6789 if (fb->pitches[0] < intel_framebuffer_pitch_for_width(mode->hdisplay,
6790 fb->bits_per_pixel))
6793 if (obj->base.size < mode->vdisplay * fb->pitches[0])
6796 return fb;
6810 struct drm_framebuffer *fb;
6882 fb = mode_fits_in_fbdev(dev, mode);
6883 if (fb == NULL) {
6884 DRM_DEBUG_KMS("creating tmp fb for load-detection\n");
6885 fb = intel_framebuffer_create_for_mode(dev, mode, 24, 32);
6886 old->release_fb = fb;
6889 if (IS_ERR(fb)) {
6895 if (intel_set_mode(crtc, mode, 0, 0, fb)) {
7141 if (!crtc->fb)
7158 if (!crtc->fb)
7161 if (to_intel_framebuffer(crtc->fb)->obj != obj)
7294 struct drm_framebuffer *fb,
7322 intel_ring_emit(ring, fb->pitches[0]);
7338 struct drm_framebuffer *fb,
7363 intel_ring_emit(ring, fb->pitches[0]);
7379 struct drm_framebuffer *fb,
7402 intel_ring_emit(ring, fb->pitches[0]);
7427 struct drm_framebuffer *fb,
7446 intel_ring_emit(ring, fb->pitches[0] | obj->tiling_mode);
7477 struct drm_framebuffer *fb,
7511 intel_ring_emit(ring, (fb->pitches[0] | obj->tiling_mode));
7527 struct drm_framebuffer *fb,
7534 struct drm_framebuffer *fb,
7539 struct drm_framebuffer *old_fb = crtc->fb;
7540 struct drm_i915_gem_object *obj = to_intel_framebuffer(fb)->obj;
7547 if (fb->pixel_format != crtc->fb->pixel_format)
7555 (fb->offsets[0] != crtc->fb->offsets[0] ||
7556 fb->pitches[0] != crtc->fb->pitches[0]))
7594 crtc->fb = fb;
7602 ret = dev_priv->display.queue_flip(dev, crtc, fb, obj);
7614 crtc->fb = old_fb;
7731 struct drm_framebuffer *fb,
7738 switch (fb->pixel_format) {
7840 struct drm_framebuffer *fb,
7869 fb, pipe_config);
8409 int x, int y, struct drm_framebuffer *fb)
8436 pipe_config = intel_modeset_pipe_config(crtc, fb, mode);
8477 x, y, fb);
8513 int x, int y, struct drm_framebuffer *fb)
8517 ret = __intel_set_mode(crtc, mode, x, y, fb);
8527 intel_set_mode(crtc, &crtc->mode, crtc->x, crtc->y, crtc->fb);
8623 /* We should be able to check here if the fb has the same properties
8627 } else if (set->crtc->fb != set->fb) {
8628 /* If we have no fb then treat it as a full mode set */
8629 if (set->crtc->fb == NULL) {
8630 DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
8632 } else if (set->fb == NULL) {
8634 } else if (set->fb->pixel_format !=
8635 set->crtc->fb->pixel_format) {
8642 if (set->fb && (set->x != set->crtc->x || set->y != set->crtc->y))
8666 WARN_ON(!set->fb && (set->num_connectors != 0));
8667 WARN_ON(set->fb && (set->num_connectors == 0));
8684 if ((!set->fb || ro == set->num_connectors) &&
8766 /* Enforce sane interface api - has been abused by the fb helper. */
8767 BUG_ON(!set->mode && set->fb);
8768 BUG_ON(set->fb && set->num_connectors == 0);
8770 if (set->fb) {
8772 set->crtc->base.id, set->fb->base.id,
8793 save_set.fb = set->crtc->fb;
8795 /* Compute whether we need a full modeset, only an fb base update or no
8806 if ((set->mode == NULL) && set->fb) {
8807 DRM_DEBUG_KMS("fb changed without set->mode");
8813 set->x, set->y, set->fb);
8818 set->x, set->y, set->fb);
8830 save_set.x, save_set.y, save_set.fb))
9160 static void intel_user_framebuffer_destroy(struct drm_framebuffer *fb)
9162 struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
9164 drm_framebuffer_cleanup(fb);
9170 static int intel_user_framebuffer_create_handle(struct drm_framebuffer *fb,
9174 struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
9990 crtc->fb);
10038 if (!crtc->fb)