Skip to contentSkip to conversation

RFC: pipe writeback design for i915

Intel-gfx Bharadiya,Pankaj 3 participants 5 messages Feb 4, 2020 – Feb 12, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 10 lines

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Ville Syrjälä
Sent: Friday, January 31, 2020 5:28 PM
To: Laxminarayan Bharadiya, Pankaj <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] RFC: pipe writeback design for i915

Quoted 2 lines · Bharadiya,Pankaj

I am exploring the way of implementing the pipe writeback feature in i915 and would like to get early feedback on design.

[snip]

Quoted 17 lines
Quoted 17 lines

1# Extend the intel_connector to support writeback
--------------------------------------------------

drm_writeback connector is of drm_connector type and intel_connector is also of drm_connector type.

  +-----------------------------------------------------------------------------+
  |                                     |                                       |
  | struct drm_writeback_connector {    |    struct intel_connector {           |
  |         struct drm_connector base;  |            struct drm_connector base; |
  |         .                           |            .                          |
  |         .                           |            .                          |
  |         .                           |            .                          |
  | };                                  |    };                                 |
  |                                     |                                       |
Quoted 5 lines
Quoted 2 lines

+---------------------------------------------------------------------
--------+

That's a bit unfortunate. We like to use intel_connector quite a bit in
i915 so having two different types is going to be a pita. Ideally I guess the writeback connector shouldn't be a drm_connector at all and instead it would just provide some kind of thing to embed into the driver's connector struct. But that would mean the writeback helpers would need some other way to get at that data rather than just container_of().

I am thinking of the following -

- Modify the struct drm_writeback_connector accept drm_connector pointer (*base)
- Add new member in struct drm_connector to save struct drm_writeback_connector pointer so that drm_writeback_connector can be found using given a drm_connector.
- Modify existing drivers (rcar_du, arm/malidp, arm/komeda, vc4) which are implementing drm_writeback to adapt to this new change.

Here is the example patch I came with -

----------------------

drivers/gpu/drm/drm_writeback.c +6 -5
index 43d9e3bb3a94..cb4434baa2eb 100644
@@ -87,7 +87,7 @@ static const char *drm_writeback_fence_get_driver_name(struct dma_fence *fence)
 	struct drm_writeback_connector *wb_connector =
 		fence_to_wb_connector(fence);
 
-	return wb_connector->base.dev->driver->name;
+	return wb_connector->base->dev->driver->name;
 }
 
 static const char *
@@ -178,7 +178,7 @@ int drm_writeback_connector_init(struct drm_device *dev,
 				 const u32 *formats, int n_formats)
 {
 	struct drm_property_blob *blob;
-	struct drm_connector *connector = &wb_connector->base;
+	struct drm_connector *connector = wb_connector->base;
 	struct drm_mode_config *config = &dev->mode_config;
 	int ret = create_writeback_properties(dev);
 
@@ -198,6 +198,7 @@ int drm_writeback_connector_init(struct drm_device *dev,
 		goto fail;
 
 	connector->interlace_allowed = 0;
+	connector->wb_connector = wb_connector;
 
 	ret = drm_connector_init(dev, connector, con_funcs,
 				 DRM_MODE_CONNECTOR_WRITEBACK);
@@ -264,7 +265,7 @@ int drm_writeback_prepare_job(struct drm_writeback_job *job)
 {
 	struct drm_writeback_connector *connector = job->connector;
 	const struct drm_connector_helper_funcs *funcs =
-		connector->base.helper_private;
+		connector->base->helper_private;
 	int ret;
 
 	if (funcs->prepare_writeback_job) {
@@ -316,7 +317,7 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job)
 {
 	struct drm_writeback_connector *connector = job->connector;
 	const struct drm_connector_helper_funcs *funcs =
-		connector->base.helper_private;
+		connector->base->helper_private;
 
 	if (job->prepared && funcs->cleanup_writeback_job)
 		funcs->cleanup_writeback_job(connector, job);
@@ -402,7 +403,7 @@ drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector)
 {
 	struct dma_fence *fence;
 
-	if (WARN_ON(wb_connector->base.connector_type !=
+	if (WARN_ON(wb_connector->base->connector_type !=
 		    DRM_MODE_CONNECTOR_WRITEBACK))
 		return NULL;
 
include/drm/drm_connector.h +3 -0
index 2113500b4075..edd153f1815e 100644
@@ -42,6 +42,7 @@ struct drm_property_blob;
 struct drm_printer;
 struct edid;
 struct i2c_adapter;
+struct drm_writeback_connector;
 
 enum drm_connector_force {
 	DRM_FORCE_UNSPECIFIED,
@@ -1315,6 +1316,8 @@ struct drm_connector {
 	 */
 	struct drm_encoder *encoder;
 
+	struct drm_writeback_connector  *wb_connector;
+
 #define MAX_ELD_BYTES	128
 	/** @eld: EDID-like data, if present */
 	uint8_t eld[MAX_ELD_BYTES];
include/drm/drm_writeback.h +2 -2
index 777c14c847f0..51a94c6a4ae3 100644
@@ -16,7 +16,7 @@
 #include <linux/workqueue.h>
 
 struct drm_writeback_connector {
-	struct drm_connector base;
+	struct drm_connector *base;
 
 	/**
 	 * @encoder: Internal encoder used by the connector to fulfill
@@ -134,7 +134,7 @@ struct drm_writeback_job {
 static inline struct drm_writeback_connector *
 drm_connector_to_writeback(struct drm_connector *connector)
 {
-	return container_of(connector, struct drm_writeback_connector, base);
+	return connector->wb_connector;
 }
 
 int drm_writeback_connector_init(struct drm_device *dev,

---------------------

With this, we should be able to extend intel_connector to support writeback.

struct intel_connector {
        struct drm_connector base;

+ struct drm_writeback_connector wb_conn;
.
.
.
}

Example usage:

	struct intel_connector *intel_connector;
	intel_connector = intel_connector_alloc();

	intel_connector->wb_conn.base = &intel_connector->base;

	/* Initialize writeback connector */
	drm_writeback_connector_init(...,&intel_connector->wb_conn, ...);

What do you think?

Thanks,
Pankaj

Quoted 8 lines

--
Ville Syrjälä
Intel
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki

Quoted 6 lines

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for RFC: pipe writeback design for i915

== Series Details ==

== Series Details ==

Series: RFC: pipe writeback design for i915
URL : https://patchwork.freedesktop.org/series/72958/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
aa098022234b RFC: pipe writeback design for i915
-:10: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#10: 
Quoted 1 line

From: Intel-gfx <[email protected]> On Behalf Of Ville Syrjälä

-:197: ERROR:MISSING_SIGN_OFF: Missing Signed-off-by: line(s)

total: 1 errors, 1 warnings, 0 checks, 78 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for RFC: pipe writeback design for i915

In reply to Bharadiya,Pankaj
== Series Details ==

== Series Details ==

Series: RFC: pipe writeback design for i915
URL : https://patchwork.freedesktop.org/series/72958/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7866 -> Patchwork_16409
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/index.html

Known issues
------------

Here are the changes found in Patchwork_16409 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_gem_contexts:
- fi-byt-j1900: [PASS][1] -> [DMESG-FAIL][2] ([i915#1052])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html
- fi-cfl-8700k: [PASS][3] -> [INCOMPLETE][4] ([i915#424])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html

#### Possible fixes ####

* igt@gem_close_race@basic-threads:
- fi-byt-n2820: [INCOMPLETE][5] ([i915#45]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-n2820/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/fi-byt-n2820/igt@[email protected]

* igt@gem_exec_parallel@fds:
- fi-byt-j1900: [FAIL][7] ([i915#694]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-j1900/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/fi-byt-j1900/igt@[email protected]

* igt@i915_selftest@live_execlists:
- fi-icl-y: [DMESG-FAIL][9] ([fdo#108569]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-icl-y/igt@i915_selftest@live_execlists.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/fi-icl-y/igt@i915_selftest@live_execlists.html

* igt@i915_selftest@live_gem_contexts:
- fi-kbl-x1275: [DMESG-FAIL][11] ([i915#943]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-kbl-x1275/igt@i915_selftest@live_gem_contexts.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/fi-kbl-x1275/igt@i915_selftest@live_gem_contexts.html

#### Warnings ####

* igt@gem_exec_parallel@contexts:
- fi-byt-j1900: [TIMEOUT][13] ([fdo#112271] / [i915#1084]) -> [FAIL][14] ([i915#694])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-j1900/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/fi-byt-j1900/igt@[email protected]

[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#1052]: https://gitlab.freedesktop.org/drm/intel/issues/1052
[i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084
[i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
[i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#943]: https://gitlab.freedesktop.org/drm/intel/issues/943

Participating hosts (46 -> 39)
------------------------------

Additional (5): fi-skl-6770hq fi-ilk-650 fi-icl-u3 fi-kbl-8809g fi-icl-dsi
Missing (12): fi-ilk-m540 fi-hsw-4200u fi-hsw-peppy fi-glk-dsi fi-bsw-cyan fi-kbl-7500u fi-ctg-p8600 fi-gdg-551 fi-ivb-3770 fi-bdw-samus fi-byt-clapper fi-skl-6600u

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7866 -> Patchwork_16409

CI-20190529: 20190529
CI_DRM_7866: bd8251861a5c1ac11e3510355f503675a05d26e6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5417: 33cc93c8ba5daa0b7498f297a4f626844d895d06 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16409: aa098022234b16284b1ac5bbe45f77c21a4a5871 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

aa098022234b RFC: pipe writeback design for i915

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for RFC: pipe writeback design for i915

In reply to Bharadiya,Pankaj
== Series Details ==

== Series Details ==

Series: RFC: pipe writeback design for i915
URL : https://patchwork.freedesktop.org/series/72958/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7866_full -> Patchwork_16409_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Known issues
------------

Here are the changes found in Patchwork_16409_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#110841])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb4/igt@[email protected]

* igt@gem_exec_schedule@pi-common-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([i915#677])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-contexts-chain-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#112146]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb1/igt@[email protected]

* igt@gem_partial_pwrite_pread@reads-display:
- shard-hsw: [PASS][7] -> [FAIL][8] ([i915#694])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-hsw6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-hsw5/igt@[email protected]

* igt@gem_softpin@noreloc-s3:
- shard-skl: [PASS][9] -> [INCOMPLETE][10] ([i915#69])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-skl3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-skl5/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-skl: [PASS][11] -> [FAIL][12] ([i915#454])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-skl4/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-skl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([i915#180]) +7 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-kbl1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-kbl1/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-skl: [PASS][15] -> [INCOMPLETE][16] ([i915#300])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-skl4/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-skl6/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [PASS][17] -> [FAIL][18] ([i915#79])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-skl6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-skl9/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: [PASS][19] -> [DMESG-WARN][20] ([i915#180]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-apl2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-apl1/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-move:
- shard-tglb: [PASS][21] -> [SKIP][22] ([i915#668])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-tglb3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-tglb2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-skl: [PASS][23] -> [FAIL][24] ([fdo#108145]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-skl1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-skl2/igt@[email protected]

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb3/igt@kms_psr@psr2_no_drrs.html

* igt@perf_pmu@busy-no-semaphores-vcs1:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#112080]) +8 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb3/igt@[email protected]

* igt@prime_busy@hang-bsd2:
- shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#109276]) +19 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb3/igt@[email protected]

#### Possible fixes ####

* igt@gem_busy@busy-vcs1:
- shard-iclb: [SKIP][31] ([fdo#112080]) -> [PASS][32] +10 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb6/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@fifo-bsd1:
- shard-iclb: [SKIP][33] ([fdo#109276]) -> [PASS][34] +16 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@pi-userfault-bsd:
- shard-iclb: [SKIP][35] ([i915#677]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb1/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb5/igt@[email protected]

* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [SKIP][37] ([fdo#112146]) -> [PASS][38] +7 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb1/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb3/igt@[email protected]

* igt@gen7_exec_parse@basic-offset:
- shard-hsw: [FAIL][39] ([i915#694]) -> [PASS][40] +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-hsw7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-hsw5/igt@[email protected]

* igt@i915_pm_rps@reset:
- shard-iclb: [FAIL][41] ([i915#413]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb8/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb3/igt@[email protected]

* igt@i915_selftest@live_blt:
- shard-hsw: [DMESG-FAIL][43] ([i915#725]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-hsw4/igt@i915_selftest@live_blt.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-hsw1/igt@i915_selftest@live_blt.html

* igt@i915_suspend@fence-restore-untiled:
- shard-skl: [INCOMPLETE][45] ([i915#69]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-skl4/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-skl5/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-dpms:
- shard-apl: [FAIL][47] ([i915#54]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-apl8/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-apl3/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-apl: [DMESG-WARN][49] ([i915#180]) -> [PASS][50] +3 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-apl6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-apl8/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw: [FAIL][51] ([i915#96]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-hsw4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-hsw7/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [DMESG-WARN][53] ([i915#180]) -> [PASS][54] +4 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-kbl2/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-kbl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][55] ([fdo#108145]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-skl2/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-skl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][57] ([fdo#108145] / [i915#265]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-skl6/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-skl6/igt@[email protected]

* igt@kms_psr2_su@page_flip:
- shard-iclb: [SKIP][59] ([fdo#109642] / [fdo#111068]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb5/igt@kms_psr2_su@page_flip.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb2/igt@kms_psr2_su@page_flip.html

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][61] ([fdo#109441]) -> [PASS][62] +1 similar issue
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb5/igt@kms_psr@psr2_primary_page_flip.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

#### Warnings ####

* igt@gem_ctx_isolation@vcs1-nonpriv-switch:
- shard-iclb: [SKIP][63] ([fdo#112080]) -> [FAIL][64] ([IGT#28])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-iclb5/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-iclb4/igt@[email protected]

* igt@gem_tiled_blits@normal:
- shard-hsw: [FAIL][65] ([i915#818]) -> [FAIL][66] ([i915#694])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/shard-hsw1/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/shard-hsw2/igt@[email protected]

[IGT#28]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#300]: https://gitlab.freedesktop.org/drm/intel/issues/300
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
[i915#96]: https://gitlab.freedesktop.org/drm/intel/issues/96

Participating hosts (9 -> 10)
------------------------------

Additional (1): pig-glk-j5005

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7866 -> Patchwork_16409

CI-20190529: 20190529
CI_DRM_7866: bd8251861a5c1ac11e3510355f503675a05d26e6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5417: 33cc93c8ba5daa0b7498f297a4f626844d895d06 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16409: aa098022234b16284b1ac5bbe45f77c21a4a5871 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16409/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
In reply to Bharadiya,Pankaj
Quoted 190 lines

-----Original Message-----
From: Laxminarayan Bharadiya, Pankaj <[email protected]>
Sent: Tuesday, February 4, 2020 1:35 PM
To: Syrjala, Ville <[email protected]>
Cc: Jani Nikula <[email protected]>; [email protected]; Deak, Imre <[email protected]>; Vivi, Rodrigo <[email protected]>; intel- [email protected]; Shankar, Uma <[email protected]>; Laxminarayan Bharadiya, Pankaj <[email protected]>
Subject: Re: [Intel-gfx] RFC: pipe writeback design for i915

Quoted 12 lines

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Ville Syrjälä
Sent: Friday, January 31, 2020 5:28 PM
To: Laxminarayan Bharadiya, Pankaj <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] RFC: pipe writeback design for i915

Quoted 2 lines · Bharadiya,Pankaj

I am exploring the way of implementing the pipe writeback feature in i915 and would like to get early feedback on design.

[snip]

Quoted 17 lines
Quoted 17 lines

1# Extend the intel_connector to support writeback
--------------------------------------------------

drm_writeback connector is of drm_connector type and intel_connector is also of drm_connector type.

  +-----------------------------------------------------------------------------+
  |                                     |                                       |
  | struct drm_writeback_connector {    |    struct intel_connector {           |
  |         struct drm_connector base;  |            struct drm_connector base; |
  |         .                           |            .                          |
  |         .                           |            .                          |
  |         .                           |            .                          |
  | };                                  |    };                                 |
  |                                     |                                       |
Quoted 7 lines
Quoted 3 lines
+-------------------------------------------------------------------
+--

--------+

That's a bit unfortunate. We like to use intel_connector quite a bit in
i915 so having two different types is going to be a pita. Ideally I guess the

writeback connector shouldn't be a drm_connector at all and instead it would just provide some kind of thing to embed into the driver's connector struct. But that would mean the writeback helpers would need some other way to get at that data rather than just container_of().

I am thinking of the following -

- Modify the struct drm_writeback_connector accept drm_connector pointer (*base)
- Add new member in struct drm_connector to save struct drm_writeback_connector pointer so that drm_writeback_connector can be found using given a
drm_connector.
- Modify existing drivers (rcar_du, arm/malidp, arm/komeda, vc4) which are implementing drm_writeback to adapt to this new change.

Here is the example patch I came with -

----------------------

drivers/gpu/drm/drm_writeback.c +1 -1
index 43d9e3bb3a94..cb4434baa2eb 100644
@@ -87,7 +87,7 @@ static const char
 *drm_writeback_fence_get_driver_name(struct dma_fence *fence)
 	struct drm_writeback_connector *wb_connector =
 		fence_to_wb_connector(fence);
 
-	return wb_connector->base.dev->driver->name;
+	return wb_connector->base->dev->driver->name;
 }
 

static const char *

drivers/gpu/drm/drm_writeback.c +4 -3
@@ -178,7 +178,7 @@ int drm_writeback_connector_init(struct drm_device *dev,
 				 const u32 *formats, int n_formats)  {
 	struct drm_property_blob *blob;
-	struct drm_connector *connector = &wb_connector->base;
+	struct drm_connector *connector = wb_connector->base;
 	struct drm_mode_config *config = &dev->mode_config;
 	int ret = create_writeback_properties(dev);
 
@@ -198,6 +198,7 @@ int drm_writeback_connector_init(struct drm_device *dev,
 		goto fail;
 
 	connector->interlace_allowed = 0;
+	connector->wb_connector = wb_connector;
 
 	ret = drm_connector_init(dev, connector, con_funcs,
 				 DRM_MODE_CONNECTOR_WRITEBACK);
@@ -264,7 +265,7 @@ int drm_writeback_prepare_job(struct drm_writeback_job
 *job)  {
 	struct drm_writeback_connector *connector = job->connector;
 	const struct drm_connector_helper_funcs *funcs =
-		connector->base.helper_private;
+		connector->base->helper_private;
 	int ret;
 
 	if (funcs->prepare_writeback_job) {
@@ -316,7 +317,7 @@ void drm_writeback_cleanup_job(struct drm_writeback_job
 *job)  {
 	struct drm_writeback_connector *connector = job->connector;
 	const struct drm_connector_helper_funcs *funcs =
-		connector->base.helper_private;
+		connector->base->helper_private;
 
 	if (job->prepared && funcs->cleanup_writeback_job)
 		funcs->cleanup_writeback_job(connector, job); @@ -402,7 +403,7

@@ drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector) {

drivers/gpu/drm/drm_writeback.c +1 -1
 	struct dma_fence *fence;
 
-	if (WARN_ON(wb_connector->base.connector_type !=
+	if (WARN_ON(wb_connector->base->connector_type !=
 		    DRM_MODE_CONNECTOR_WRITEBACK))
 		return NULL;
include/drm/drm_connector.h index renamed from include/drm/drm_connector.h +0 -0

2113500b4075..edd153f1815e 100644

include/drm/drm_connector.h +3 -0
@@ -42,6 +42,7 @@ struct drm_property_blob;  struct drm_printer;  struct edid;
 struct i2c_adapter;
+struct drm_writeback_connector;
 
 enum drm_connector_force {
 	DRM_FORCE_UNSPECIFIED,
@@ -1315,6 +1316,8 @@ struct drm_connector {
 	 */
 	struct drm_encoder *encoder;
 
+	struct drm_writeback_connector  *wb_connector;
+
 #define MAX_ELD_BYTES	128
 	/** @eld: EDID-like data, if present */
 	uint8_t eld[MAX_ELD_BYTES];
include/drm/drm_writeback.h index renamed from include/drm/drm_writeback.h +0 -0

777c14c847f0..51a94c6a4ae3 100644

include/drm/drm_writeback.h +2 -1
@@ -16,7 +16,7 @@
 #include <linux/workqueue.h>
 
 struct drm_writeback_connector {
-	struct drm_connector base;
+	struct drm_connector *base;
 
 	/**
 	 * @encoder: Internal encoder used by the connector to fulfill @@ -134,7
+134,7 @@ struct drm_writeback_job {  static inline struct

drm_writeback_connector * drm_connector_to_writeback(struct drm_connector *connector) {

include/drm/drm_writeback.h +1 -2
-	return container_of(connector, struct drm_writeback_connector, base);
+	return connector->wb_connector;
 }
 
 int drm_writeback_connector_init(struct drm_device *dev,
 
---------------------

With this, we should be able to extend intel_connector to support writeback.

struct intel_connector {
        struct drm_connector base;
include/drm/drm_writeback.h +1 -0
+	struct drm_writeback_connector wb_conn;

.
.
.
}

Example usage:

	struct intel_connector *intel_connector;
	intel_connector = intel_connector_alloc();

	intel_connector->wb_conn.base = &intel_connector->base;

	/* Initialize writeback connector */
	drm_writeback_connector_init(...,&intel_connector->wb_conn, ...);
Quoted 1 line

What do you think?

I feel adding a pointer as base could work. But since it involves a major change in drm core, please involve the dri-devel also in this discussion.

Changing the write_back_connector and decoupling from drm_connector will involve lot of re-structuring in all the drm drivers currently using the writeback framework as well helpers needed to be added for the same.

Ville/Jani N: How should we approach this ?

Regards,
Uma Shankar

Quoted 12 lines

Thanks,
Pankaj

Quoted 9 lines

--
Ville Syrjälä
Intel
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki Business Identity Code:
0357606 - 4 Domiciled in Helsinki

Quoted 8 lines
Quoted 1 line

This e-mail and any attachments may contain confidential material for the sole use

of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

Quoted 5 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx