Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Pekka Paalanen <ppaalanen@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH v10 5/6] drm/i915: update the hdcp state with uevent
Date: Fri, 12 Jul 2019 12:30:25 +0530	[thread overview]
Message-ID: <20190712070026.13088-6-ramalingam.c@intel.com> (raw)
In-Reply-To: <20190712070026.13088-1-ramalingam.c@intel.com>

drm function to update the content protection property state and to
generate a uevent is invoked from the intel hdcp property work.

Hence whenever kernel changes the property state, userspace will be
updated with a uevent.

Need a ACK for uevent generating uAPI from userspace.

v2:
  state update is moved into drm function [daniel]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/display/intel_hdcp.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index 1434fc09ca29..845eb8f29b58 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -869,7 +869,6 @@ static void intel_hdcp_prop_work(struct work_struct *work)
 					       prop_work);
 	struct intel_connector *connector = intel_hdcp_to_connector(hdcp);
 	struct drm_device *dev = connector->base.dev;
-	struct drm_connector_state *state;
 
 	drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
 	mutex_lock(&hdcp->mutex);
@@ -879,10 +878,9 @@ static void intel_hdcp_prop_work(struct work_struct *work)
 	 * those to UNDESIRED is handled by core. If value == UNDESIRED,
 	 * we're running just after hdcp has been disabled, so just exit
 	 */
-	if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {
-		state = connector->base.state;
-		state->content_protection = hdcp->value;
-	}
+	if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED)
+		drm_hdcp_update_content_protection(&connector->base,
+						   hdcp->value);
 
 	mutex_unlock(&hdcp->mutex);
 	drm_modeset_unlock(&dev->mode_config.connection_mutex);
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-07-12  7:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12  7:00 [PATCH v10 0/6] HDCP2.2 Phase II Ramalingam C
2019-07-12  7:00 ` [PATCH v10 1/6] drm: Add Content protection type property Ramalingam C
2019-07-14 11:00   ` [PATCH v11 " Ramalingam C
2019-07-29 14:20     ` Pekka Paalanen
2019-07-29  9:33       ` Ramalingam C
2019-08-01 10:05         ` Pekka Paalanen
2019-08-01 10:18           ` Ramalingam C
2019-07-12  7:00 ` [PATCH v10 2/6] drm/i915: Attach content " Ramalingam C
2019-07-12  7:00 ` [PATCH v10 3/6] drm: uevent for connector status change Ramalingam C
2019-07-12  7:00 ` [PATCH v10 4/6] drm/hdcp: update content protection property with uevent Ramalingam C
2019-07-12  7:00 ` Ramalingam C [this message]
2019-07-12  7:00 ` [PATCH v10 6/6] drm/hdcp: reference for srm file format Ramalingam C
2019-08-01 10:36   ` Sharma, Shashank
2019-08-01 10:43     ` Ramalingam C
2019-07-12 17:48 ` ✗ Fi.CI.CHECKPATCH: warning for HDCP2.2 Phase II (rev12) Patchwork
2019-07-12 18:07 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-14  9:25 ` ✓ Fi.CI.IGT: " Patchwork
2019-07-14 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for HDCP2.2 Phase II (rev13) Patchwork
2019-07-14 18:24 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-15  3:09 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190712070026.13088-6-ramalingam.c@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ppaalanen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox