Message ID | 20181206141132.23349-2-paul.kocialkowski@bootlin.com |
---|---|
State | Accepted |
Series | "Chamelium VC4 plane testing, with T-tiled mode" |
Commit | 7eeb13d7b27d87afdc8dd8bdec770811eac47c8d |
Headers | show |
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c index 8a9f6bfe..b8cab927 100644 --- a/tests/kms_chamelium.c +++ b/tests/kms_chamelium.c @@ -504,7 +504,7 @@ static void chamelium_paint_xr24_pattern(uint32_t *data, *(data + i * stride / 4 + j) = colors[((j / 64) + (i / 64)) % 5]; } -static int chamelium_get_pattern_fb(data_t *data, drmModeModeInfo *mode, +static int chamelium_get_pattern_fb(data_t *data, size_t width, size_t height, uint32_t fourcc, struct igt_fb *fb) { int fb_id; @@ -512,15 +512,14 @@ static int chamelium_get_pattern_fb(data_t *data, drmModeModeInfo *mode, igt_assert(fourcc == DRM_FORMAT_XRGB8888); - fb_id = igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, - fourcc, LOCAL_DRM_FORMAT_MOD_NONE, fb); + fb_id = igt_create_fb(data->drm_fd, width, height, fourcc, + LOCAL_DRM_FORMAT_MOD_NONE, fb); igt_assert(fb_id > 0); ptr = igt_fb_map_buffer(fb->fd, fb); igt_assert(ptr); - chamelium_paint_xr24_pattern(ptr, mode->hdisplay, mode->vdisplay, - fb->strides[0]); + chamelium_paint_xr24_pattern(ptr, width, height, fb->strides[0]); igt_fb_unmap_buffer(fb, ptr); return fb_id; @@ -541,7 +540,7 @@ static void do_test_display(data_t *data, struct chamelium_port *port, int i, fb_id, captured_frame_count; int frame_id; - fb_id = chamelium_get_pattern_fb(data, mode, + fb_id = chamelium_get_pattern_fb(data, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888, &fb); igt_assert(fb_id > 0);
Are there some patches missing here? This doesn't seem to apply cleanly to master, and it looks like this is relying on some changes to chamelium_paint_xr24_pattern() that aren't in the tree (otherwise, this patch lgtm, Reviewed-by: Lyude Paul <lyude@redhat.com>) On Thu, 2018-12-06 at 15:11 +0100, Paul Kocialkowski wrote: > In order to reuse the pattern generation helper for overlay planes, > let's provide the pattern generation helper with the explicit dimensions > instead of the mode (that only applies to the primary plane). > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> > --- > tests/kms_chamelium.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c > index 8a9f6bfe..b8cab927 100644 > --- a/tests/kms_chamelium.c > +++ b/tests/kms_chamelium.c > @@ -504,7 +504,7 @@ static void chamelium_paint_xr24_pattern(uint32_t *data, > *(data + i * stride / 4 + j) = colors[((j / 64) + (i / > 64)) % 5]; > } > > -static int chamelium_get_pattern_fb(data_t *data, drmModeModeInfo *mode, > +static int chamelium_get_pattern_fb(data_t *data, size_t width, size_t > height, > uint32_t fourcc, struct igt_fb *fb) > { > int fb_id; > @@ -512,15 +512,14 @@ static int chamelium_get_pattern_fb(data_t *data, > drmModeModeInfo *mode, > > igt_assert(fourcc == DRM_FORMAT_XRGB8888); > > - fb_id = igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, > - fourcc, LOCAL_DRM_FORMAT_MOD_NONE, fb); > + fb_id = igt_create_fb(data->drm_fd, width, height, fourcc, > + LOCAL_DRM_FORMAT_MOD_NONE, fb); > igt_assert(fb_id > 0); > > ptr = igt_fb_map_buffer(fb->fd, fb); > igt_assert(ptr); > > - chamelium_paint_xr24_pattern(ptr, mode->hdisplay, mode->vdisplay, > - fb->strides[0]); > + chamelium_paint_xr24_pattern(ptr, width, height, fb->strides[0]); > igt_fb_unmap_buffer(fb, ptr); > > return fb_id; > @@ -541,7 +540,7 @@ static void do_test_display(data_t *data, struct > chamelium_port *port, > int i, fb_id, captured_frame_count; > int frame_id; > > - fb_id = chamelium_get_pattern_fb(data, mode, > + fb_id = chamelium_get_pattern_fb(data, mode->hdisplay, mode->vdisplay, > DRM_FORMAT_XRGB8888, &fb); > igt_assert(fb_id > 0); >
Hi, On Thu, 2018-12-06 at 16:43 -0500, Lyude Paul wrote: > Are there some patches missing here? This doesn't seem to apply cleanly to > master, and it looks like this is relying on some changes to > chamelium_paint_xr24_pattern() that aren't in the tree Yes, there are definitely missing patches in this series! It's mentionned in the cover letter, where it says: This series is based on Maxime Ripard's series: igt: chamelium: Test YUV buffers using the Chamelium which was not merged yet. Maybe I should better include the patches I need in my series next time? > (otherwise, this patch lgtm, Reviewed-by: Lyude Paul <lyude@redhat.com>) Thanks for reviewing the series! Cheers, Paul > On Thu, 2018-12-06 at 15:11 +0100, Paul Kocialkowski wrote: > > In order to reuse the pattern generation helper for overlay planes, > > let's provide the pattern generation helper with the explicit dimensions > > instead of the mode (that only applies to the primary plane). > > > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> > > --- > > tests/kms_chamelium.c | 11 +++++------ > > 1 file changed, 5 insertions(+), 6 deletions(-) > > > > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c > > index 8a9f6bfe..b8cab927 100644 > > --- a/tests/kms_chamelium.c > > +++ b/tests/kms_chamelium.c > > @@ -504,7 +504,7 @@ static void chamelium_paint_xr24_pattern(uint32_t *data, > > *(data + i * stride / 4 + j) = colors[((j / 64) + (i / > > 64)) % 5]; > > } > > > > -static int chamelium_get_pattern_fb(data_t *data, drmModeModeInfo *mode, > > +static int chamelium_get_pattern_fb(data_t *data, size_t width, size_t > > height, > > uint32_t fourcc, struct igt_fb *fb) > > { > > int fb_id; > > @@ -512,15 +512,14 @@ static int chamelium_get_pattern_fb(data_t *data, > > drmModeModeInfo *mode, > > > > igt_assert(fourcc == DRM_FORMAT_XRGB8888); > > > > - fb_id = igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, > > - fourcc, LOCAL_DRM_FORMAT_MOD_NONE, fb); > > + fb_id = igt_create_fb(data->drm_fd, width, height, fourcc, > > + LOCAL_DRM_FORMAT_MOD_NONE, fb); > > igt_assert(fb_id > 0); > > > > ptr = igt_fb_map_buffer(fb->fd, fb); > > igt_assert(ptr); > > > > - chamelium_paint_xr24_pattern(ptr, mode->hdisplay, mode->vdisplay, > > - fb->strides[0]); > > + chamelium_paint_xr24_pattern(ptr, width, height, fb->strides[0]); > > igt_fb_unmap_buffer(fb, ptr); > > > > return fb_id; > > @@ -541,7 +540,7 @@ static void do_test_display(data_t *data, struct > > chamelium_port *port, > > int i, fb_id, captured_frame_count; > > int frame_id; > > > > - fb_id = chamelium_get_pattern_fb(data, mode, > > + fb_id = chamelium_get_pattern_fb(data, mode->hdisplay, mode->vdisplay, > > DRM_FORMAT_XRGB8888, &fb); > > igt_assert(fb_id > 0); > >
On Fri, 2018-12-07 at 08:37 +0100, Paul Kocialkowski wrote: > Hi, > > On Thu, 2018-12-06 at 16:43 -0500, Lyude Paul wrote: > > Are there some patches missing here? This doesn't seem to apply cleanly to > > master, and it looks like this is relying on some changes to > > chamelium_paint_xr24_pattern() that aren't in the tree > > Yes, there are definitely missing patches in this series! It's > mentionned in the cover letter, where it says: > > This series is based on Maxime Ripard's series: > igt: chamelium: Test YUV buffers using the Chamelium > > which was not merged yet. Maybe I should better include the patches I > need in my series next time? Whoops! My fault for missing that. Also, does Maxime have push privileges with igt? I just want to make sure you don't have a bunch of work on the ML that has gotten reviewed by someone but hasn't gotten pushed anywhere > > > (otherwise, this patch lgtm, Reviewed-by: Lyude Paul <lyude@redhat.com>) > > Thanks for reviewing the series! > > Cheers, > > Paul > > > On Thu, 2018-12-06 at 15:11 +0100, Paul Kocialkowski wrote: > > > In order to reuse the pattern generation helper for overlay planes, > > > let's provide the pattern generation helper with the explicit dimensions > > > instead of the mode (that only applies to the primary plane). > > > > > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> > > > --- > > > tests/kms_chamelium.c | 11 +++++------ > > > 1 file changed, 5 insertions(+), 6 deletions(-) > > > > > > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c > > > index 8a9f6bfe..b8cab927 100644 > > > --- a/tests/kms_chamelium.c > > > +++ b/tests/kms_chamelium.c > > > @@ -504,7 +504,7 @@ static void chamelium_paint_xr24_pattern(uint32_t > > > *data, > > > *(data + i * stride / 4 + j) = colors[((j / 64) + (i / > > > 64)) % 5]; > > > } > > > > > > -static int chamelium_get_pattern_fb(data_t *data, drmModeModeInfo > > > *mode, > > > +static int chamelium_get_pattern_fb(data_t *data, size_t width, size_t > > > height, > > > uint32_t fourcc, struct igt_fb *fb) > > > { > > > int fb_id; > > > @@ -512,15 +512,14 @@ static int chamelium_get_pattern_fb(data_t *data, > > > drmModeModeInfo *mode, > > > > > > igt_assert(fourcc == DRM_FORMAT_XRGB8888); > > > > > > - fb_id = igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, > > > - fourcc, LOCAL_DRM_FORMAT_MOD_NONE, fb); > > > + fb_id = igt_create_fb(data->drm_fd, width, height, fourcc, > > > + LOCAL_DRM_FORMAT_MOD_NONE, fb); > > > igt_assert(fb_id > 0); > > > > > > ptr = igt_fb_map_buffer(fb->fd, fb); > > > igt_assert(ptr); > > > > > > - chamelium_paint_xr24_pattern(ptr, mode->hdisplay, mode->vdisplay, > > > - fb->strides[0]); > > > + chamelium_paint_xr24_pattern(ptr, width, height, fb->strides[0]); > > > igt_fb_unmap_buffer(fb, ptr); > > > > > > return fb_id; > > > @@ -541,7 +540,7 @@ static void do_test_display(data_t *data, struct > > > chamelium_port *port, > > > int i, fb_id, captured_frame_count; > > > int frame_id; > > > > > > - fb_id = chamelium_get_pattern_fb(data, mode, > > > + fb_id = chamelium_get_pattern_fb(data, mode->hdisplay, mode->vdisplay, > > > DRM_FORMAT_XRGB8888, &fb); > > > igt_assert(fb_id > 0); > > >
In order to reuse the pattern generation helper for overlay planes, let's provide the pattern generation helper with the explicit dimensions instead of the mode (that only applies to the primary plane). Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> --- tests/kms_chamelium.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)