[igt-dev] [i-g-t, v2] tests/kms_content_protection: Initialize fb height width to 0

Surendrakumar Upadhyay, TejaskumarX tejaskumarx.surendrakumar.upadhyay at intel.com
Fri Mar 19 12:33:25 UTC 2021



> -----Original Message-----
> From: Latvala, Petri <petri.latvala at intel.com>
> Sent: 19 March 2021 18:00
> To: Surendrakumar Upadhyay, TejaskumarX
> <tejaskumarx.surendrakumar.upadhyay at intel.com>
> Cc: igt-dev at lists.freedesktop.org; Pandey, Hariom
> <hariom.pandey at intel.com>
> Subject: Re: [igt-dev] [i-g-t, v2] tests/kms_content_protection: Initialize fb
> height width to 0
> 
> On Fri, Mar 19, 2021 at 05:00:44PM +0530, Tejas Upadhyay wrote:
> > While requesting for framebuffer height and width should be in kernel
> > expected limit. As the test is not initializing height and width to 0
> > garbage framebuffer size is getting requested and fails. Addressed
> > same, initalizing height and width to 0.
> >
> > Changes since V1:
> > 	- Added igt_display_require_output(&data.display)
> > 	- Removed extra newlines
> >
> > Signed-off-by: Tejas Upadhyay
> > <tejaskumarx.surendrakumar.upadhyay at intel.com>
> 
> Reviewed-by: Petri Latvala <petri.latvala at intel.com>
> 
> Are there bug reports that this closes?
> 
> https://gitlab.freedesktop.org/drm/intel/-/issues/3144 at least I suppose.
> What about
> https://gitlab.freedesktop.org/drm/intel/-/issues/3137 ?
> 
> Add a "Closes: <url>" to the commit message for each one.
> 

Yes it closes, https://gitlab.freedesktop.org/drm/intel/-/issues/3144 and https://gitlab.freedesktop.org/drm/intel/-/issues/3137 both. I will modify commit message as you mentioned.

Thanks,
Tejas
> 
> --
> Petri Latvala
> 
> 
> > ---
> >  tests/kms_content_protection.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/kms_content_protection.c
> b/tests/kms_content_protection.c
> > index 0c2173fb..0fdbacdd 100644
> > --- a/tests/kms_content_protection.c
> > +++ b/tests/kms_content_protection.c
> > @@ -707,7 +707,7 @@ static void test_content_protection_cleanup(void)
> >  static void create_fbs(void)
> >  {
> >  	igt_output_t *output;
> > -	int width, height;
> > +	int width = 0, height = 0;
> >  	drmModeModeInfo *mode;
> >
> >  	for_each_connected_output(&data.display, output) {
> > @@ -730,9 +730,8 @@ igt_main
> >  {
> >  	igt_fixture {
> >  		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > -
> >  		igt_display_require(&data.display, data.drm_fd);
> > -
> > +		igt_display_require_output(&data.display);
> >  		create_fbs();
> >  	}
> >
> > --
> > 2.30.0
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev


More information about the igt-dev mailing list