diff mbox series

[libdrm,06/10] modetest: don't pretend that atomic mode includes a format

Message ID 20190603004017.7114-7-imirkin@alum.mit.edu (mailing list archive)
State New, archived
Headers show
Series Add C8, 30bpp and FP16 support to modetest | expand

Commit Message

Ilia Mirkin June 3, 2019, 12:40 a.m. UTC
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
---
 tests/modetest/modetest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Emil Velikov June 6, 2019, 3:49 p.m. UTC | #1
On Mon, 3 Jun 2019 at 01:40, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
>
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> ---
>  tests/modetest/modetest.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
> index 9c85c07b..a1c81f6c 100644
> --- a/tests/modetest/modetest.c
> +++ b/tests/modetest/modetest.c
> @@ -1335,8 +1335,8 @@ static void atomic_set_mode(struct device *dev, struct pipe_arg *pipes, unsigned
>                 if (pipe->mode == NULL)
>                         continue;
>
> -               printf("setting mode %s-%dHz@%s on connectors ",
> -                      pipe->mode_str, pipe->mode->vrefresh, pipe->format_str);
> +               printf("setting mode %s-%dHz on connectors ",
> +                      pipe->mode_str, pipe->mode->vrefresh);

AFAICT we can drop the format on modeset all together. I cannot see
anything that would require it - regardless if the modeset is atomic
or not.
Plus we can remove the --help string and argument parsing code.

Can I interest you in doing that?

-Emil
Ilia Mirkin June 6, 2019, 3:58 p.m. UTC | #2
On Thu, Jun 6, 2019 at 11:51 AM Emil Velikov <emil.l.velikov@gmail.com> wrote:
>
> On Mon, 3 Jun 2019 at 01:40, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> >
> > Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> > ---
> >  tests/modetest/modetest.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
> > index 9c85c07b..a1c81f6c 100644
> > --- a/tests/modetest/modetest.c
> > +++ b/tests/modetest/modetest.c
> > @@ -1335,8 +1335,8 @@ static void atomic_set_mode(struct device *dev, struct pipe_arg *pipes, unsigned
> >                 if (pipe->mode == NULL)
> >                         continue;
> >
> > -               printf("setting mode %s-%dHz@%s on connectors ",
> > -                      pipe->mode_str, pipe->mode->vrefresh, pipe->format_str);
> > +               printf("setting mode %s-%dHz on connectors ",
> > +                      pipe->mode_str, pipe->mode->vrefresh);
>
> AFAICT we can drop the format on modeset all together. I cannot see
> anything that would require it - regardless if the modeset is atomic
> or not.
> Plus we can remove the --help string and argument parsing code.
>
> Can I interest you in doing that?

The format plays with a non-atomic modeset. It's used for the fb that
gets added.

  -ilia
Emil Velikov June 6, 2019, 4:14 p.m. UTC | #3
On Thu, 6 Jun 2019 at 16:58, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
>
> On Thu, Jun 6, 2019 at 11:51 AM Emil Velikov <emil.l.velikov@gmail.com> wrote:
> >
> > On Mon, 3 Jun 2019 at 01:40, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> > >
> > > Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> > > ---
> > >  tests/modetest/modetest.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
> > > index 9c85c07b..a1c81f6c 100644
> > > --- a/tests/modetest/modetest.c
> > > +++ b/tests/modetest/modetest.c
> > > @@ -1335,8 +1335,8 @@ static void atomic_set_mode(struct device *dev, struct pipe_arg *pipes, unsigned
> > >                 if (pipe->mode == NULL)
> > >                         continue;
> > >
> > > -               printf("setting mode %s-%dHz@%s on connectors ",
> > > -                      pipe->mode_str, pipe->mode->vrefresh, pipe->format_str);
> > > +               printf("setting mode %s-%dHz on connectors ",
> > > +                      pipe->mode_str, pipe->mode->vrefresh);
> >
> > AFAICT we can drop the format on modeset all together. I cannot see
> > anything that would require it - regardless if the modeset is atomic
> > or not.
> > Plus we can remove the --help string and argument parsing code.
> >
> > Can I interest you in doing that?
>
> The format plays with a non-atomic modeset. It's used for the fb that
> gets added.
>
Right with atomic we do the modeset and then attach a fb when
applicable. With legacy we pass the fb during modeset. Using an
invalid fb we end up re-using the currently bound one.
And since there is none - we need to provide a valid one.

Thanks for the correction :-)
Emil
diff mbox series

Patch

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 9c85c07b..a1c81f6c 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -1335,8 +1335,8 @@  static void atomic_set_mode(struct device *dev, struct pipe_arg *pipes, unsigned
 		if (pipe->mode == NULL)
 			continue;
 
-		printf("setting mode %s-%dHz@%s on connectors ",
-		       pipe->mode_str, pipe->mode->vrefresh, pipe->format_str);
+		printf("setting mode %s-%dHz on connectors ",
+		       pipe->mode_str, pipe->mode->vrefresh);
 		for (j = 0; j < pipe->num_cons; ++j) {
 			printf("%s, ", pipe->cons[j]);
 			add_property(dev, pipe->con_ids[j], "CRTC_ID", pipe->crtc->crtc->crtc_id);