{
}
+static int vigs_crtc_cursor_set(struct drm_crtc *crtc,
+ struct drm_file *file_priv,
+ uint32_t handle,
+ uint32_t width,
+ uint32_t height)
+{
+ /*
+ * Not supported.
+ */
+
+ return 0;
+}
+
+static int vigs_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
+{
+ /*
+ * Not supported.
+ */
+
+ return 0;
+}
+
static int vigs_crtc_page_flip(struct drm_crtc *crtc,
struct drm_framebuffer *fb,
struct drm_pending_vblank_event *event)
static const struct drm_crtc_funcs vigs_crtc_funcs =
{
+ .cursor_set = vigs_crtc_cursor_set,
+ .cursor_move = vigs_crtc_cursor_move,
.set_config = drm_crtc_helper_set_config,
.page_flip = vigs_crtc_page_flip,
.destroy = vigs_crtc_destroy,
if (!gem) {
DRM_ERROR("GEM lookup failed, handle = %u\n", mode_cmd->handles[0]);
- return NULL;
+ return ERR_PTR(-ENOENT);
}
vigs_gem = gem_to_vigs_gem(gem);
if (vigs_gem->type != VIGS_GEM_TYPE_SURFACE) {
DRM_ERROR("GEM is not a surface, handle = %u\n", mode_cmd->handles[0]);
drm_gem_object_unreference_unlocked(gem);
- return NULL;
+ return ERR_PTR(-ENOENT);
}
vigs_sfc = vigs_gem_to_vigs_surface(vigs_gem);
if (ret != 0) {
DRM_ERROR("unable to create the framebuffer: %d\n", ret);
- return NULL;
+ return ERR_PTR(ret);
}
return &vigs_fb->base;
if ((fb_sfc->width != mode_cmd->width) ||
(fb_sfc->height != mode_cmd->height) ||
(fb_sfc->stride != mode_cmd->pitches[0])) {
- DRM_DEBUG_KMS("surface format mismatch\n");
+ DRM_DEBUG_KMS("surface format mismatch, sfc - (%u,%u,%u), mode - (%u,%u,%u)\n",
+ fb_sfc->width, fb_sfc->height, fb_sfc->stride,
+ mode_cmd->width, mode_cmd->height, mode_cmd->pitches[0]);
ret = -EINVAL;
goto fail2;
}