summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2016-07-25 15:14:54 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2016-07-26 14:49:59 +0200
commita8e23215c65444a7a25a9871e7959cb6f76dda0d (patch)
tree7d85178cd56959a2572bf30d52a690ef41203d09 /lib
parent5af520a1a0aec04b020ad808fdb90de49bd0e27b (diff)
igt_kms: Assign pipe properties in pipe init
This is a small change required for changing PIPE_ANY to PIPE_NONE, but it's a standalone change, so make it a separate commit. Suggested-and-reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c54
1 files changed, 23 insertions, 31 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 1ef16d8e..75e097b9 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1325,15 +1325,37 @@ void igt_display_init(igt_display_t *display, int drm_fd)
int p = IGT_PLANE_2;
int j, type;
uint8_t n_planes = 0;
+ uint64_t prop_value;
pipe->crtc_id = resources->crtcs[i];
pipe->display = display;
pipe->pipe = i;
+ get_crtc_property(display->drm_fd, pipe->crtc_id,
+ "background_color",
+ &pipe->background_property,
+ &prop_value,
+ NULL);
+ pipe->background = (uint32_t)prop_value;
+ get_crtc_property(display->drm_fd, pipe->crtc_id,
+ "DEGAMMA_LUT",
+ &pipe->degamma_property,
+ NULL,
+ NULL);
+ get_crtc_property(display->drm_fd, pipe->crtc_id,
+ "CTM",
+ &pipe->ctm_property,
+ NULL,
+ NULL);
+ get_crtc_property(display->drm_fd, pipe->crtc_id,
+ "GAMMA_LUT",
+ &pipe->gamma_property,
+ NULL,
+ NULL);
+
/* add the planes that can be used with that pipe */
for (j = 0; j < plane_resources->count_planes; j++) {
drmModePlane *drm_plane;
- uint64_t prop_value;
drm_plane = drmModeGetPlane(display->drm_fd,
plane_resources->planes[j]);
@@ -1440,7 +1462,6 @@ void igt_display_init(igt_display_t *display, int drm_fd)
igt_assert(display->outputs);
for (i = 0; i < display->n_outputs; i++) {
- int j;
igt_output_t *output = &display->outputs[i];
/*
@@ -1452,35 +1473,6 @@ void igt_display_init(igt_display_t *display, int drm_fd)
output->display = display;
igt_output_refresh(output);
-
- for (j = 0; j < display->n_pipes; j++) {
- uint64_t prop_value;
- igt_pipe_t *pipe = &display->pipes[j];
-
- if (output->config.crtc) {
- get_crtc_property(display->drm_fd, output->config.crtc->crtc_id,
- "background_color",
- &pipe->background_property,
- &prop_value,
- NULL);
- pipe->background = (uint32_t)prop_value;
- get_crtc_property(display->drm_fd, output->config.crtc->crtc_id,
- "DEGAMMA_LUT",
- &pipe->degamma_property,
- NULL,
- NULL);
- get_crtc_property(display->drm_fd, output->config.crtc->crtc_id,
- "CTM",
- &pipe->ctm_property,
- NULL,
- NULL);
- get_crtc_property(display->drm_fd, output->config.crtc->crtc_id,
- "GAMMA_LUT",
- &pipe->gamma_property,
- NULL,
- NULL);
- }
- }
}
drmModeFreePlaneResources(plane_resources);