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: 11271785 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 85700139A for ; Tue, 3 Dec 2019 17:37:40 +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 6AB6A20803 for ; Tue, 3 Dec 2019 17:37:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6AB6A20803 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=poorly.run Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A85296EA66; Tue, 3 Dec 2019 17:37:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yw1-xc41.google.com (mail-yw1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD9BD6EA49 for ; Tue, 3 Dec 2019 17:37:37 +0000 (UTC) Received: by mail-yw1-xc41.google.com with SMTP id i190so1647609ywc.2 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=ldqNrnA7MEj8A/bw0PmIoJ6fKej2QmYHtH/SyMEKx30XzcQYBGEP9AG6rslvDFmuW9 D9GTJQ0ke3Zmou73wM7M8ppDkmiMvyyDX5ilCLePKng060S7zfOLEJ1cr0RHiVcLANE8 SL+JcieiDxgV0JOOLj4Gjbnb83/c9gHkJ8Icx26mSS2BQUjB2ZAfYNOOIu1Bep+VGHpX 9kqHwbarQpeQMI3KwKXTmdcLvPQ9KI+kGv4lYFZpoEyAQB6SJMC9TYaYsP1iyaImVE4+ doImRhNK+fxBIC+ciwnPq/herkoGoxzDoMdr5pMkZNlb5DcT+93YFx4De6a99RePBR1H G+IQ== X-Gm-Message-State: APjAAAUgWTY6vHG8Ki55PsDcbTmFQ+1zl9MPMnfbQ2LfxqqZa7DJuS9U V66fEiFszJGOvhB2bdShhNj5cA== 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 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== Subject: [Intel-gfx] [PATCH 09/11] drm/i915: Use ddi_update_pipe in intel_dp_mst 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: , Cc: David Airlie , Sean Paul Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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;