Lines Matching refs:crtc

144  * mode setting driver. They can be used mostly independantely from the crtc
149 /* simple single crtc case helper function */
234 static void drm_fb_helper_save_lut_atomic(struct drm_crtc *crtc, struct drm_fb_helper *helper)
239 r_base = crtc->gamma_store;
240 g_base = r_base + crtc->gamma_size;
241 b_base = g_base + crtc->gamma_size;
243 for (i = 0; i < crtc->gamma_size; i++)
244 helper->funcs->gamma_get(crtc, &r_base[i], &g_base[i], &b_base[i], i);
247 static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
251 if (crtc->funcs->gamma_set == NULL)
254 r_base = crtc->gamma_store;
255 g_base = r_base + crtc->gamma_size;
256 b_base = g_base + crtc->gamma_size;
258 crtc->funcs->gamma_set(crtc, r_base, g_base, b_base, 0, crtc->gamma_size);
275 if (!mode_set->crtc->enabled)
278 funcs = mode_set->crtc->helper_private;
279 drm_fb_helper_save_lut_atomic(mode_set->crtc, helper);
280 funcs->mode_set_base_atomic(mode_set->crtc,
293 static struct drm_framebuffer *drm_mode_config_fb(struct drm_crtc *crtc)
295 struct drm_device *dev = crtc->dev;
299 if (crtc->base.id == c->base.id)
309 struct drm_crtc *crtc;
316 crtc = mode_set->crtc;
317 funcs = crtc->helper_private;
318 fb = drm_mode_config_fb(crtc);
320 if (!crtc->enabled)
328 drm_fb_helper_restore_lut_atomic(mode_set->crtc);
329 funcs->mode_set_base_atomic(mode_set->crtc, fb, crtc->x,
330 crtc->y, LEAVE_ATOMIC_MODE_SET);
345 ret = mode_set->crtc->funcs->set_config(mode_set);
403 DRM_ERROR("Failed to restore crtc configuration\n");
435 struct drm_crtc *crtc;
444 crtc = fb_helper->crtc_info[i].mode_set.crtc;
446 if (!crtc->enabled)
508 struct drm_crtc *crtc;
541 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
542 fb_helper->crtc_info[i].mode_set.crtc = crtc;
573 static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
617 fb_helper->funcs->gamma_set(crtc, red,
621 fb_helper->funcs->gamma_get(crtc, &r,
626 fb_helper->funcs->gamma_set(crtc, r,
633 fb_helper->funcs->gamma_set(crtc, red, green, blue, pindex);
642 struct drm_crtc *crtc;
647 crtc = fb_helper->crtc_info[i].mode_set.crtc;
648 crtc_funcs = crtc->helper_private;
666 rc = setcolreg(crtc, hred, hgreen, hblue, start++, info);
670 crtc_funcs->load_lut(crtc);
774 struct drm_crtc *crtc;
785 crtc = fb_helper->crtc_info[i].mode_set.crtc;
786 ret = crtc->funcs->set_config(&fb_helper->crtc_info[i].mode_set);
808 struct drm_crtc *crtc;
814 crtc = fb_helper->crtc_info[i].mode_set.crtc;
822 ret = crtc->funcs->set_config(modeset);
845 struct drm_crtc *crtc;
900 gamma_size = fb_helper->crtc_info[i].mode_set.crtc->gamma_size;
916 DRM_INFO("Cannot find any crtc or sizes - going 1024x768\n");
954 crtc = fb_helper->crtc_info[i].mode_set.crtc;
955 ret = crtc->funcs->set_config(&fb_helper->crtc_info[i].mode_set);
1147 /* only contemplate cloning in the single crtc case */
1257 struct drm_fb_helper_crtc **crtcs, *crtc;
1290 /* select a crtc for this connector and then attempt to configure
1293 crtc = &fb_helper->crtc_info[c];
1299 if (best_crtcs[o] == crtc)
1303 /* ignore cloning unless only a single crtc */
1311 crtcs[n] = crtc;
1316 best_crtc = crtc;
1369 /* fill out the connector<->crtc mappings into the modesets */
1381 DRM_DEBUG_KMS("desired mode %s set on crtc %d\n",
1382 mode->name, fb_crtc->mode_set.crtc->base.id);
1459 struct drm_crtc *crtc;
1465 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
1466 if (crtc->fb)
1468 if (crtc->fb == fb_helper->fb)