Re:[PATCH libdrm v1 2/2] tests/modetest: Add support for writeback connector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rohith:




At 2022-07-26 03:26:39, "Rohith Iyer" <quic_rohiiyer@xxxxxxxxxxx> wrote:
>Add writeback support to modetest with the below options:

>+		case 'o':
>+			pipe_args->dump = true;
>+			dump_path = optarg;
>+			break;
> 		case 'P':
> 			plane_args = realloc(plane_args,
> 					     (plane_count + 1) * sizeof *plane_args);
>@@ -2098,6 +2173,7 @@ int main(int argc, char **argv)
> 			crtcs = 1;
> 			planes = 1;
> 			break;
>+		case 'x':
> 		case 's':
> 			pipe_args = realloc(pipe_args,
> 					    (count + 1) * sizeof *pipe_args);
>@@ -2109,7 +2185,7 @@ int main(int argc, char **argv)
> 
> 			if (parse_connector(&pipe_args[count], optarg) < 0)
> 				usage(argv[0]);
>-
>+			pipe_args->custom = (c == 'x');
> 			count++;
> 			break;
> 		case 'C':
>@@ -2165,6 +2241,7 @@ int main(int argc, char **argv)
> 
> 	if (use_atomic) {
> 		ret = drmSetClientCap(dev.fd, DRM_CLIENT_CAP_ATOMIC, 1);
>+		drmSetClientCap(dev.fd, DRM_CLIENT_CAP_WRITEBACK_CONNECTORS, 1);
> 		if (ret) {
> 			fprintf(stderr, "no atomic modesetting support: %s\n", strerror(errno));
> 			drmClose(dev.fd);
>@@ -2208,6 +2285,8 @@ int main(int argc, char **argv)
> 			if (set_preferred || count)
> 				set_mode(&dev, pipe_args, count);
> 
>+			writeback_config(&dev, pipe_args, count);
>+
> 			if (plane_count)
> 				atomic_set_planes(&dev, plane_args, plane_count, false);
> 
>@@ -2217,6 +2296,13 @@ int main(int argc, char **argv)
> 				return 1;
> 			}

> 


How do we make sure the writeback is finished?  Do we need a writeback fence here?

>+			/*
>+			 * Since only writeback connectors have an output fb, this should only be
>+			 * called for writeback.
>+			 */
>+			if (pipe_args->dump)
>+				dump_output_fb(&dev, pipe_args, dump_path, count);
>+
> 			if (test_vsync)
> 				atomic_test_page_flip(&dev, pipe_args, plane_args, plane_count);
> 
>-- 
>2.31.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux