Lines Matching refs:crtc
370 struct drm_crtc *crtc; in drm_framebuffer_remove() local
376 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in drm_framebuffer_remove()
377 if (crtc->fb == fb) { in drm_framebuffer_remove()
380 set.crtc = crtc; in drm_framebuffer_remove()
382 ret = crtc->funcs->set_config(&set); in drm_framebuffer_remove()
384 DRM_ERROR("failed to reset crtc %p when fb was deleted\n", crtc); in drm_framebuffer_remove()
396 plane->crtc = NULL; in drm_framebuffer_remove()
420 int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, in drm_crtc_init() argument
425 crtc->dev = dev; in drm_crtc_init()
426 crtc->funcs = funcs; in drm_crtc_init()
427 crtc->invert_dimensions = false; in drm_crtc_init()
431 ret = drm_mode_object_get(dev, &crtc->base, DRM_MODE_OBJECT_CRTC); in drm_crtc_init()
435 crtc->base.properties = &crtc->properties; in drm_crtc_init()
437 list_add_tail(&crtc->head, &dev->mode_config.crtc_list); in drm_crtc_init()
457 void drm_crtc_cleanup(struct drm_crtc *crtc) in drm_crtc_cleanup() argument
459 struct drm_device *dev = crtc->dev; in drm_crtc_cleanup()
461 free(crtc->gamma_store, DRM_MEM_KMS); in drm_crtc_cleanup()
462 crtc->gamma_store = NULL; in drm_crtc_cleanup()
464 drm_mode_object_put(dev, &crtc->base); in drm_crtc_cleanup()
465 list_del(&crtc->head); in drm_crtc_cleanup()
1018 struct drm_crtc *crtc; in drm_mode_group_init_legacy_group() local
1026 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) in drm_mode_group_init_legacy_group()
1027 group->id_list[group->num_crtcs++] = crtc->base.id; in drm_mode_group_init_legacy_group()
1056 struct drm_crtc *crtc, *ct; in drm_mode_config_cleanup() local
1092 list_for_each_entry_safe(crtc, ct, &dev->mode_config.crtc_list, head) { in drm_mode_config_cleanup()
1093 crtc->funcs->destroy(crtc); in drm_mode_config_cleanup()
1204 struct drm_crtc *crtc; in drm_mode_getresources() local
1273 list_for_each_entry(crtc, &dev->mode_config.crtc_list, in drm_mode_getresources()
1275 DRM_DEBUG_KMS("[CRTC:%d]\n", crtc->base.id); in drm_mode_getresources()
1276 if (put_user(crtc->base.id, crtc_id + copied)) { in drm_mode_getresources()
1388 struct drm_crtc *crtc; in drm_mode_getcrtc() local
1403 crtc = obj_to_crtc(obj); in drm_mode_getcrtc()
1405 crtc_resp->x = crtc->x; in drm_mode_getcrtc()
1406 crtc_resp->y = crtc->y; in drm_mode_getcrtc()
1407 crtc_resp->gamma_size = crtc->gamma_size; in drm_mode_getcrtc()
1408 if (crtc->fb) in drm_mode_getcrtc()
1409 crtc_resp->fb_id = crtc->fb->base.id; in drm_mode_getcrtc()
1413 if (crtc->enabled) { in drm_mode_getcrtc()
1415 drm_crtc_convert_to_umode(&crtc_resp->mode, &crtc->mode); in drm_mode_getcrtc()
1591 if (encoder->crtc) in drm_mode_getencoder()
1592 enc_resp->crtc_id = encoder->crtc->base.id; in drm_mode_getencoder()
1687 if (plane->crtc) in drm_mode_getplane()
1688 plane_resp->crtc_id = plane->crtc->base.id; in drm_mode_getplane()
1740 struct drm_crtc *crtc; in drm_mode_setplane() local
1768 plane->crtc = NULL; in drm_mode_setplane()
1781 crtc = obj_to_crtc(obj); in drm_mode_setplane()
1837 ret = plane->funcs->update_plane(plane, crtc, fb, in drm_mode_setplane()
1843 plane->crtc = crtc; in drm_mode_setplane()
1876 struct drm_crtc *crtc; in drm_mode_setcrtc() local
1900 crtc = obj_to_crtc(obj); in drm_mode_setcrtc()
1901 DRM_DEBUG_KMS("[CRTC:%d]\n", crtc->base.id); in drm_mode_setcrtc()
1908 if (!crtc->fb) { in drm_mode_setcrtc()
1913 fb = crtc->fb; in drm_mode_setcrtc()
1943 if (crtc->invert_dimensions) { in drm_mode_setcrtc()
1957 crtc->invert_dimensions ? " (inverted)" : ""); in drm_mode_setcrtc()
2013 set.crtc = crtc; in drm_mode_setcrtc()
2020 ret = crtc->funcs->set_config(&set); in drm_mode_setcrtc()
2034 struct drm_crtc *crtc; in drm_mode_cursor_ioctl() local
2050 crtc = obj_to_crtc(obj); in drm_mode_cursor_ioctl()
2053 if (!crtc->funcs->cursor_set) { in drm_mode_cursor_ioctl()
2058 ret = crtc->funcs->cursor_set(crtc, file_priv, req->handle, in drm_mode_cursor_ioctl()
2063 if (crtc->funcs->cursor_move) { in drm_mode_cursor_ioctl()
2064 ret = crtc->funcs->cursor_move(crtc, req->x, req->y); in drm_mode_cursor_ioctl()
2574 int drm_mode_attachmode_crtc(struct drm_device *dev, struct drm_crtc *crtc, in drm_mode_attachmode_crtc() argument
2585 if (connector->encoder->crtc == crtc) { in drm_mode_attachmode_crtc()
2598 if (connector->encoder->crtc == crtc) in drm_mode_attachmode_crtc()
3231 struct drm_crtc *crtc = obj_to_crtc(obj); in drm_mode_crtc_set_obj_prop() local
3233 if (crtc->funcs->set_property) in drm_mode_crtc_set_obj_prop()
3234 ret = crtc->funcs->set_property(crtc, property, value); in drm_mode_crtc_set_obj_prop()
3397 int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, in drm_mode_crtc_set_gamma_size() argument
3400 crtc->gamma_size = gamma_size; in drm_mode_crtc_set_gamma_size()
3402 crtc->gamma_store = malloc(gamma_size * sizeof(uint16_t) * 3, in drm_mode_crtc_set_gamma_size()
3414 struct drm_crtc *crtc; in drm_mode_gamma_set_ioctl() local
3428 crtc = obj_to_crtc(obj); in drm_mode_gamma_set_ioctl()
3430 if (crtc->funcs->gamma_set == NULL) { in drm_mode_gamma_set_ioctl()
3436 if (crtc_lut->gamma_size != crtc->gamma_size) { in drm_mode_gamma_set_ioctl()
3442 r_base = crtc->gamma_store; in drm_mode_gamma_set_ioctl()
3460 crtc->funcs->gamma_set(crtc, r_base, g_base, b_base, 0, crtc->gamma_size); in drm_mode_gamma_set_ioctl()
3473 struct drm_crtc *crtc; in drm_mode_gamma_get_ioctl() local
3487 crtc = obj_to_crtc(obj); in drm_mode_gamma_get_ioctl()
3490 if (crtc_lut->gamma_size != crtc->gamma_size) { in drm_mode_gamma_get_ioctl()
3496 r_base = crtc->gamma_store; in drm_mode_gamma_get_ioctl()
3530 struct drm_crtc *crtc; in drm_mode_page_flip_ioctl() local
3547 crtc = obj_to_crtc(obj); in drm_mode_page_flip_ioctl()
3549 if (crtc->fb == NULL) { in drm_mode_page_flip_ioctl()
3558 if (crtc->funcs->page_flip == NULL) in drm_mode_page_flip_ioctl()
3566 hdisplay = crtc->mode.hdisplay; in drm_mode_page_flip_ioctl()
3567 vdisplay = crtc->mode.vdisplay; in drm_mode_page_flip_ioctl()
3569 if (crtc->invert_dimensions) { in drm_mode_page_flip_ioctl()
3578 crtc->x > fb->width - hdisplay || in drm_mode_page_flip_ioctl()
3579 crtc->y > fb->height - vdisplay) { in drm_mode_page_flip_ioctl()
3581 fb->width, fb->height, hdisplay, vdisplay, crtc->x, crtc->y, in drm_mode_page_flip_ioctl()
3582 crtc->invert_dimensions ? " (inverted)" : ""); in drm_mode_page_flip_ioctl()
3607 ret = crtc->funcs->page_flip(crtc, fb, e); in drm_mode_page_flip_ioctl()
3624 struct drm_crtc *crtc; in drm_mode_config_reset() local
3628 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) in drm_mode_config_reset()
3629 if (crtc->funcs->reset) in drm_mode_config_reset()
3630 crtc->funcs->reset(crtc); in drm_mode_config_reset()