diff mbox

[1/7] drm: Define a work struct for scheduling a uevent for modeset retry

Message ID 1477524358-16563-1-git-send-email-manasi.d.navare@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Navare, Manasi Oct. 26, 2016, 11:25 p.m. UTC
This work struct will be used to schedule a uevent on a separate
thread. This will be scheduled after a link train failure during modeset
to indicate a modeset retry request. It will get executed after the
current modeset is complete and all locks are released. This was
required to avoid deadlock.

v2:
* Create a generic work func not i915 specific (Daniel Vetter)

Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>

Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 include/drm/drm_connector.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Jani Nikula Oct. 28, 2016, 12:01 p.m. UTC | #1
On Thu, 27 Oct 2016, Manasi Navare <manasi.d.navare@intel.com> wrote:
> This work struct will be used to schedule a uevent on a separate
> thread. This will be scheduled after a link train failure during modeset
> to indicate a modeset retry request. It will get executed after the
> current modeset is complete and all locks are released. This was
> required to avoid deadlock.
>
> v2:
> * Create a generic work func not i915 specific (Daniel Vetter)
>
> Cc: dri-devel@lists.freedesktop.org
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  include/drm/drm_connector.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index ac9d7d8..fc9d475 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -682,6 +682,11 @@ struct drm_connector {
>  	uint8_t num_h_tile, num_v_tile;
>  	uint8_t tile_h_loc, tile_v_loc;
>  	uint16_t tile_h_size, tile_v_size;
> +
> +	/* Work struct to schedule a uevent on link train failure for
> +	 * DisplayPort.
> +	 */
> +	struct work_struct modeset_retry_work;

I think at least for now we should keep this in intel_connector. All the
code using this will be in i915.

BR,
Jani.

>  };
>  
>  #define obj_to_connector(x) container_of(x, struct drm_connector, base)
Jani Nikula Oct. 28, 2016, 12:16 p.m. UTC | #2
On Fri, 28 Oct 2016, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Thu, 27 Oct 2016, Manasi Navare <manasi.d.navare@intel.com> wrote:
>> This work struct will be used to schedule a uevent on a separate
>> thread. This will be scheduled after a link train failure during modeset
>> to indicate a modeset retry request. It will get executed after the
>> current modeset is complete and all locks are released. This was
>> required to avoid deadlock.
>>
>> v2:
>> * Create a generic work func not i915 specific (Daniel Vetter)
>>
>> Cc: dri-devel@lists.freedesktop.org
>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>> Cc: Daniel Vetter <daniel.vetter@intel.com>
>> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
>>
>> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
>> ---
>>  include/drm/drm_connector.h | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
>> index ac9d7d8..fc9d475 100644
>> --- a/include/drm/drm_connector.h
>> +++ b/include/drm/drm_connector.h
>> @@ -682,6 +682,11 @@ struct drm_connector {
>>  	uint8_t num_h_tile, num_v_tile;
>>  	uint8_t tile_h_loc, tile_v_loc;
>>  	uint16_t tile_h_size, tile_v_size;
>> +
>> +	/* Work struct to schedule a uevent on link train failure for
>> +	 * DisplayPort.
>> +	 */
>> +	struct work_struct modeset_retry_work;
>
> I think at least for now we should keep this in intel_connector. All the
> code using this will be in i915.

Oh, and you can just squash that in the first patch that uses it,
i.e. patch 7/7 in this series.


>
> BR,
> Jani.
>
>>  };
>>  
>>  #define obj_to_connector(x) container_of(x, struct drm_connector, base)
diff mbox

Patch

diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index ac9d7d8..fc9d475 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -682,6 +682,11 @@  struct drm_connector {
 	uint8_t num_h_tile, num_v_tile;
 	uint8_t tile_h_loc, tile_v_loc;
 	uint16_t tile_h_size, tile_v_size;
+
+	/* Work struct to schedule a uevent on link train failure for
+	 * DisplayPort.
+	 */
+	struct work_struct modeset_retry_work;
 };
 
 #define obj_to_connector(x) container_of(x, struct drm_connector, base)