From patchwork Fri Oct 12 20:14:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Clint Taylor X-Patchwork-Id: 10639255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 341F013AD for ; Fri, 12 Oct 2018 20:14:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BAD32A37F for ; Fri, 12 Oct 2018 20:14:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F7942A414; Fri, 12 Oct 2018 20:14:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA2172A37F for ; Fri, 12 Oct 2018 20:14:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EFB26E499; Fri, 12 Oct 2018 20:13:59 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C30F6E499 for ; Fri, 12 Oct 2018 20:13:58 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2018 13:13:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,373,1534834800"; d="scan'208";a="240899031" Received: from cataylo2-ubuntu64-14.jf.intel.com ([10.7.199.52]) by orsmga004.jf.intel.com with ESMTP; 12 Oct 2018 13:13:57 -0700 From: clinton.a.taylor@intel.com To: Intel-gfx@lists.freedesktop.org Date: Fri, 12 Oct 2018 13:14:45 -0700 Message-Id: <1539375285-1489-1-git-send-email-clinton.a.taylor@intel.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915/hdmi: Initialize SCDC registers according to spec X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Clint Taylor Initialize SCDC Source Version and TDMS_Config_0 registers to nominal values during intel_hdmi_detect(). The i915 driver currently doesn't implement features that require polling of the status update bits. Once FRL, DSC, or Source Test is enabled in the driver the status flags will need to be read by the source according to specification. Cc: Ville Syrjälä Signed-off-by: Clint Taylor --- drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 2c53efc..ab3eac5 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -1910,6 +1910,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, struct drm_i915_private *dev_priv = to_i915(connector->dev); struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector); struct intel_encoder *encoder = &hdmi_to_dig_port(intel_hdmi)->base; + struct i2c_adapter *adapter = + intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus); DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name); @@ -1925,6 +1927,16 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, if (intel_hdmi_set_edid(connector)) status = connector_status_connected; + if (connector->display_info.hdmi.scdc.supported) { + /* SCDC source version HDMI 2.1 Sec. 10.4.1.2 */ + if (drm_scdc_writeb(adapter, SCDC_SOURCE_VERSION, 0x01) < 0) + DRM_DEBUG_KMS("Unable to set SCDC Source Version register\n"); + + /* Clear SCDC CONFIG_0 HDMI 2.1 Sec. 10.4.1.6 - RR_Enable Polling Only */ + if (drm_scdc_writeb(adapter, SCDC_CONFIG_0, 0x00) < 0) + DRM_DEBUG_KMS("Unable to set SCDC CONFIG_0 register\n"); + } + out: intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS);