From patchwork Tue Dec 3 17:36:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 11271787 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11436159A for ; Tue, 3 Dec 2019 17:37:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA9C5206EC for ; Tue, 3 Dec 2019 17:37:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA9C5206EC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=poorly.run Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A645A6EA48; Tue, 3 Dec 2019 17:37:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc42.google.com (mail-yw1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2E816EA51 for ; Tue, 3 Dec 2019 17:37:37 +0000 (UTC) Received: by mail-yw1-xc42.google.com with SMTP id w11so1627013ywj.9 for ; Tue, 03 Dec 2019 09:37:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iLJkGW9i+0Daici6e/qwf4xogV6B3/LFitXBdz22Y10=; b=NbbhdYLHQEKgd2IOgvuwECDyGiwddFE1mzSsFrVKB+uX/n+//G3slRxZMisZHQuSgD zj90M1HWWLYe5zmhq2nseZV28EDI9UhmwOo7EwB/hwlw4gPjgj7n21qiik049mbpTjX8 2kATogZJENtXhvQyDk9OQka21NiUbCi3u/IupTS4lKnIWoAtJwnyP7Sa57gzSZH5u+mS ZXrPqDdaqnqS61yYQhjBzfCqWvPXPZ7lLY9FpZ+81jBM7pIHgtVtpINnc+N62G8/ausX G35nWAOqBNSWM2kMVZ5auWQ9x4d1mHkde7viIDb7hjS2vtyBlg0uS8ZCXUfnr+mpQAEX DJ8w== X-Gm-Message-State: APjAAAWdPcpHBJJ8leMCk0sgMrisPTX/FlySstiitQytcp91YkJv9f/Q DPg8/6vLUQwdrI/uxHIkL5j+KuEhB5uYAw== X-Google-Smtp-Source: APXvYqxSqYKRhRFO2SfSRmbkDVQL4pqPtfUMx5dUe435JUHSnfGJ9izLT1+pJQ4UOaemcQUmnSBX2g== X-Received: by 2002:a81:44b:: with SMTP id 72mr4774884ywe.373.1575394656967; Tue, 03 Dec 2019 09:37:36 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id g190sm1729426ywf.41.2019.12.03.09.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2019 09:37:36 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, ramalingm.c@intel.com Subject: [PATCH 09/11] drm/i915: Use ddi_update_pipe in intel_dp_mst Date: Tue, 3 Dec 2019 12:36:32 -0500 Message-Id: <20191203173638.94919-10-sean@poorly.run> X-Mailer: git-send-email 2.24.0.393.g34dc348eaf-goog In-Reply-To: <20191203173638.94919-1-sean@poorly.run> References: <20191203173638.94919-1-sean@poorly.run> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iLJkGW9i+0Daici6e/qwf4xogV6B3/LFitXBdz22Y10=; b=I0LSSZgKZGNzdSuQo6F3Vs1o+zJduNMwyp4Toai4EIRmm0h5fMzlGl7gNRxFoaUoBS nTKKcjQVV/R4USEL/NfvmYf2uWdphbxosvWFWUOME1AqCI/MWVKzShHGkHyRk7FfxfSK zCzMSEHWitgkg5bID+JyPTHVOnsPqqsj72axXH+hoWfC0SQjwDFpYWK70Vf3Mc5rGB3W 24ohXEJXt15rzf0B9XsbIKmFk5IUfxrUcb4xuMIVo64iBZiPrDxmJzBz4c0WMF97//7h hbjFUS6ihHAXs8JSXDQcetSDPx/0QbV5/2c99E7CX8nPH2RHcaIiE3N8/m9cJ/CMhQTC AxMg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Sean Paul , Rodrigo Vivi Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Sean Paul In order to act upon content_protection property changes, we'll need to implement the .update_pipe() hook. We can re-use intel_ddi_update_pipe for this Signed-off-by: Sean Paul --- drivers/gpu/drm/i915/display/intel_ddi.c | 9 +++++---- drivers/gpu/drm/i915/display/intel_dp.h | 6 ++++++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index a55bc7109045..005afefbcbfa 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -4029,9 +4029,9 @@ static void intel_ddi_update_pipe_dp(struct intel_encoder *encoder, intel_panel_update_backlight(encoder, crtc_state, conn_state); } -static void intel_ddi_update_pipe(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state, - const struct drm_connector_state *conn_state) +void intel_ddi_update_pipe(struct intel_encoder *encoder, + const struct intel_crtc_state *crtc_state, + const struct drm_connector_state *conn_state) { struct intel_connector *connector = to_intel_connector(conn_state->connector); @@ -4041,7 +4041,8 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder, conn_state->content_protection != DRM_MODE_CONTENT_PROTECTION_UNDESIRED); - if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) + if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI) && + !intel_encoder_is_mst(encoder)) intel_ddi_update_pipe_dp(encoder, crtc_state, conn_state); /* diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h index 3da166054788..db732b432809 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.h +++ b/drivers/gpu/drm/i915/display/intel_dp.h @@ -123,6 +123,12 @@ static inline unsigned int intel_dp_unused_lane_mask(int lane_count) return ~((1 << lane_count) - 1) & 0xf; } + u32 intel_dp_mode_to_fec_clock(u32 mode_clock); +/* Shared between intel_dp and intel_dp_mst */ +void intel_ddi_update_pipe(struct intel_encoder *encoder, + const struct intel_crtc_state *crtc_state, + const struct drm_connector_state *conn_state); + #endif /* __INTEL_DP_H__ */ diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 715b7109c388..8ebf545c6fe5 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -628,6 +628,7 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum intel_encoder->compute_config = intel_dp_mst_compute_config; intel_encoder->disable = intel_mst_disable_dp; intel_encoder->post_disable = intel_mst_post_disable_dp; + intel_encoder->update_pipe = intel_ddi_update_pipe; intel_encoder->pre_pll_enable = intel_mst_pre_pll_enable_dp; intel_encoder->post_pll_disable = intel_mst_post_pll_disable_dp; intel_encoder->pre_enable = intel_mst_pre_enable_dp;