Lines Matching refs:crtc
232 static void drm_fb_helper_save_lut_atomic(struct drm_crtc *crtc, struct drm_fb_helper *helper)
237 r_base = crtc->gamma_store;
238 g_base = r_base + crtc->gamma_size;
239 b_base = g_base + crtc->gamma_size;
241 for (i = 0; i < crtc->gamma_size; i++)
242 helper->funcs->gamma_get(crtc, &r_base[i], &g_base[i], &b_base[i], i);
245 static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
249 if (crtc->funcs->gamma_set == NULL)
252 r_base = crtc->gamma_store;
253 g_base = r_base + crtc->gamma_size;
254 b_base = g_base + crtc->gamma_size;
256 crtc->funcs->gamma_set(crtc, r_base, g_base, b_base, 0, crtc->gamma_size);
273 if (!mode_set->crtc->enabled)
276 funcs = mode_set->crtc->helper_private;
277 drm_fb_helper_save_lut_atomic(mode_set->crtc, helper);
278 funcs->mode_set_base_atomic(mode_set->crtc,
291 static struct drm_framebuffer *drm_mode_config_fb(struct drm_crtc *crtc)
293 struct drm_device *dev = crtc->dev;
297 if (crtc->base.id == c->base.id)
307 struct drm_crtc *crtc;
314 crtc = mode_set->crtc;
315 funcs = crtc->helper_private;
316 fb = drm_mode_config_fb(crtc);
318 if (!crtc->enabled)
326 drm_fb_helper_restore_lut_atomic(mode_set->crtc);
327 funcs->mode_set_base_atomic(mode_set->crtc, fb, crtc->x,
328 crtc->y, LEAVE_ATOMIC_MODE_SET);
343 ret = mode_set->crtc->funcs->set_config(mode_set); in drm_fb_helper_restore_fbdev_mode()
433 struct drm_crtc *crtc;
442 crtc = fb_helper->crtc_info[i].mode_set.crtc;
444 if (!crtc->enabled)
506 struct drm_crtc *crtc; in drm_fb_helper_init() local
539 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in drm_fb_helper_init()
540 fb_helper->crtc_info[i].mode_set.crtc = crtc; in drm_fb_helper_init()
571 static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
615 fb_helper->funcs->gamma_set(crtc, red,
619 fb_helper->funcs->gamma_get(crtc, &r,
624 fb_helper->funcs->gamma_set(crtc, r,
631 fb_helper->funcs->gamma_set(crtc, red, green, blue, pindex);
640 struct drm_crtc *crtc;
645 crtc = fb_helper->crtc_info[i].mode_set.crtc;
646 crtc_funcs = crtc->helper_private;
664 rc = setcolreg(crtc, hred, hgreen, hblue, start++, info);
668 crtc_funcs->load_lut(crtc);
772 struct drm_crtc *crtc;
783 crtc = fb_helper->crtc_info[i].mode_set.crtc;
784 ret = crtc->funcs->set_config(&fb_helper->crtc_info[i].mode_set);
806 struct drm_crtc *crtc;
812 crtc = fb_helper->crtc_info[i].mode_set.crtc;
820 ret = crtc->funcs->set_config(modeset);
843 struct drm_crtc *crtc; in drm_fb_helper_single_fb_probe() local
898 gamma_size = fb_helper->crtc_info[i].mode_set.crtc->gamma_size; in drm_fb_helper_single_fb_probe()
952 crtc = fb_helper->crtc_info[i].mode_set.crtc; in drm_fb_helper_single_fb_probe()
953 ret = crtc->funcs->set_config(&fb_helper->crtc_info[i].mode_set); in drm_fb_helper_single_fb_probe()
1254 struct drm_fb_helper_crtc **crtcs, *crtc; in drm_pick_crtcs() local
1289 crtc = &fb_helper->crtc_info[c]; in drm_pick_crtcs()
1295 if (best_crtcs[o] == crtc) in drm_pick_crtcs()
1307 crtcs[n] = crtc; in drm_pick_crtcs()
1377 mode->name, fb_crtc->mode_set.crtc->base.id); in drm_setup_crtcs()
1453 struct drm_crtc *crtc; in drm_fb_helper_hotplug_event() local
1459 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in drm_fb_helper_hotplug_event()
1460 if (crtc->fb) in drm_fb_helper_hotplug_event()
1462 if (crtc->fb == fb_helper->fb) in drm_fb_helper_hotplug_event()