Lines Matching refs:screen
33 static void kms_screen_probe(struct kms_screen *screen) in kms_screen_probe() argument
35 struct kms_device *device = screen->device; in kms_screen_probe()
38 con = drmModeGetConnector(device->fd, screen->id); in kms_screen_probe()
42 screen->type = con->connector_type; in kms_screen_probe()
45 screen->connected = true; in kms_screen_probe()
47 screen->connected = false; in kms_screen_probe()
49 memcpy(&screen->mode, &con->modes[0], sizeof(drmModeModeInfo)); in kms_screen_probe()
50 screen->width = screen->mode.hdisplay; in kms_screen_probe()
51 screen->height = screen->mode.vdisplay; in kms_screen_probe()
58 struct kms_screen *screen; in kms_screen_create() local
60 screen = calloc(1, sizeof(*screen)); in kms_screen_create()
61 if (!screen) in kms_screen_create()
64 screen->device = device; in kms_screen_create()
65 screen->id = id; in kms_screen_create()
67 kms_screen_probe(screen); in kms_screen_create()
69 return screen; in kms_screen_create()
72 void kms_screen_free(struct kms_screen *screen) in kms_screen_free() argument
74 if (screen) in kms_screen_free()
75 free(screen->name); in kms_screen_free()
77 free(screen); in kms_screen_free()
80 int kms_screen_set(struct kms_screen *screen, struct kms_crtc *crtc, in kms_screen_set() argument
83 struct kms_device *device = screen->device; in kms_screen_set()
86 err = drmModeSetCrtc(device->fd, crtc->id, fb->id, 0, 0, &screen->id, in kms_screen_set()
87 1, &screen->mode); in kms_screen_set()