Am Donnerstag, 31. Januar 2019, 01:00:34 CET schrieb Matt Roper: > CRTC background color kernel patches were written about 2.5 years ago > and floated on the upstream mailing list, but since no opensource > userspace materialized, we never actually merged them. However the > corresponding IGT test did get merged and has basically been dead code > ever since. > > A couple years later we finally have an open source userspace > (ChromeOS), so lets update the IGT test to match the ABI that's actually > going upstream and to remove some of the cruft from the original test > that wouldn't actually work. > > It's worth noting that we don't seem to be able to test this feature > with CRC's, at least on Intel gen9. Originally we wanted to draw a > color into a plane's FB (with Cairo) and then compare the CRC to turning > off all planes and just setting the CRTC background to the same color. > However the precision and rounding of the color components causes the > CRC's to come out differently, even though the end result is visually > identical. So at the moment this test is mainly useful for visual > inspection in interactive mode. > > v2: > - Swap red and blue ordering in property value to reflect change > in v2 of kernel series. > > v3: > - Minor updates to proposed uapi helpers (s/rgba/argb/). > > v4: > - General restructuring into pipe/color subtests. > - Use RGB2101010 framebuffers for comparison so that we match the bits > of precision that Intel hardware background color accepts > > Cc: igt-dev@xxxxxxxxxxxxxxxxxxxxx > Signed-off-by: Matt Roper <matthew.d.roper@xxxxxxxxx> [...] > +igt_main > { > - igt_display_t *display = &data->display; > + data_t data = {}; > igt_output_t *output; > + drmModeModeInfo *mode; > + int w, h; > enum pipe pipe; > - int valid_tests = 0; > - > - for_each_pipe_with_valid_output(display, pipe, output) { > - igt_plane_t *plane; > - > - igt_output_set_pipe(output, pipe); > - > - plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); > - igt_require(igt_pipe_has_prop(display, pipe, IGT_CRTC_BACKGROUND)); > - > - prepare_crtc(data, output, pipe, plane, 1, PURPLE, BLACK64); > - > - /* Now set background without using a plane, i.e., > - * Disable the plane to let hw background color win blend. */ > - igt_plane_set_fb(plane, NULL); > - igt_pipe_set_prop_value(display, pipe, IGT_CRTC_BACKGROUND, PURPLE64); > - igt_display_commit2(display, COMMIT_UNIVERSAL); > - > - /* Try few other background colors */ > - igt_pipe_set_prop_value(display, pipe, IGT_CRTC_BACKGROUND, CYAN64); > - igt_display_commit2(display, COMMIT_UNIVERSAL); > - > - igt_pipe_set_prop_value(display, pipe, IGT_CRTC_BACKGROUND, YELLOW64); > - igt_display_commit2(display, COMMIT_UNIVERSAL); > > - igt_pipe_set_prop_value(display, pipe, IGT_CRTC_BACKGROUND, RED64); > - igt_display_commit2(display, COMMIT_UNIVERSAL); > + igt_fixture { > + data.gfx_fd = drm_open_driver_master(DRIVER_INTEL); DRIVER_ANY perhaps like in other tests? I'm currently looking into implementing your new background-property in the Rockchip kms driver and I guess this test shouldn't contain any intel-specifics? Heiko _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx