From: Sean Paul <sean@poorly.run> To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, freedreno@lists.freedesktop.org Cc: Sean Paul <seanpaul@chromium.org>, Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, linux-arm-msm@vger.kernel.org Subject: [PATCH 13/14] drm/msm: Add hdcp register ranges to sc7180 device tree Date: Mon, 13 Sep 2021 13:57:44 -0400 [thread overview] Message-ID: <20210913175747.47456-14-sean@poorly.run> (raw) In-Reply-To: <20210913175747.47456-1-sean@poorly.run> From: Sean Paul <seanpaul@chromium.org> This patch adds the register ranges required for HDCP to the sc7180 device tree. These registers will be used to inject HDCP key as well as toggle HDCP on and off. Signed-off-by: Sean Paul <seanpaul@chromium.org> --- drivers/gpu/drm/msm/dp/dp_parser.c | 30 +++++++++++++++++++++++++++--- drivers/gpu/drm/msm/dp/dp_parser.h | 4 ++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c b/drivers/gpu/drm/msm/dp/dp_parser.c index 0519dd3ac3c3..4bbe2485ce3c 100644 --- a/drivers/gpu/drm/msm/dp/dp_parser.c +++ b/drivers/gpu/drm/msm/dp/dp_parser.c @@ -20,11 +20,19 @@ static const struct dp_regulator_cfg sdm845_dp_reg_cfg = { }; static int msm_dss_ioremap(struct platform_device *pdev, - struct dss_io_data *io_data) + struct dss_io_data *io_data, const char *name, + int fallback_idx) { struct resource *res = NULL; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name); + + /* Support dts which do not have named resources */ + if (!res) { + if (fallback_idx >= 0) + res = platform_get_resource(pdev, IORESOURCE_MEM, + fallback_idx); + } if (!res) { DRM_ERROR("%pS->%s: msm_dss_get_res failed\n", __builtin_return_address(0), __func__); @@ -55,6 +63,8 @@ static void dp_parser_unmap_io_resources(struct dp_parser *parser) { struct dp_io *io = &parser->io; + msm_dss_iounmap(&io->hdcp_tz); + msm_dss_iounmap(&io->hdcp_key); msm_dss_iounmap(&io->dp_controller); } @@ -64,12 +74,26 @@ static int dp_parser_ctrl_res(struct dp_parser *parser) struct platform_device *pdev = parser->pdev; struct dp_io *io = &parser->io; - rc = msm_dss_ioremap(pdev, &io->dp_controller); + rc = msm_dss_ioremap(pdev, &io->dp_controller, "dp_controller", 0); if (rc) { DRM_ERROR("unable to remap dp io resources, rc=%d\n", rc); goto err; } + rc = msm_dss_ioremap(pdev, &io->hdcp_key, "hdcp_key", -1); + if (rc) { + DRM_INFO("unable to remap dp hdcp resources, rc=%d\n", rc); + io->hdcp_key.base = NULL; + io->hdcp_key.len = 0; + } + + rc = msm_dss_ioremap(pdev, &io->hdcp_tz, "hdcp_tz", -1); + if (rc) { + DRM_INFO("unable to remap dp hdcp resources, rc=%d\n", rc); + io->hdcp_tz.base = NULL; + io->hdcp_tz.len = 0; + } + io->phy = devm_phy_get(&pdev->dev, "dp"); if (IS_ERR(io->phy)) { rc = PTR_ERR(io->phy); diff --git a/drivers/gpu/drm/msm/dp/dp_parser.h b/drivers/gpu/drm/msm/dp/dp_parser.h index 34b49628bbaf..09d876620175 100644 --- a/drivers/gpu/drm/msm/dp/dp_parser.h +++ b/drivers/gpu/drm/msm/dp/dp_parser.h @@ -62,10 +62,14 @@ struct dp_display_data { * struct dp_ctrl_resource - controller's IO related data * * @dp_controller: Display Port controller mapped memory address + * @hdcp_key: mapped memory for HDCP key ingestion + * @hdcp_tz: mapped memory for HDCP TZ interaction * @phy_io: phy's mapped memory address */ struct dp_io { struct dss_io_data dp_controller; + struct dss_io_data hdcp_key; + struct dss_io_data hdcp_tz; struct phy *phy; union phy_configure_opts phy_opts; }; -- Sean Paul, Software Engineer, Google / Chromium OS
WARNING: multiple messages have this Message-ID (diff)
From: Sean Paul <sean@poorly.run> To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, freedreno@lists.freedesktop.org Cc: Sean Paul <seanpaul@chromium.org>, Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, linux-arm-msm@vger.kernel.org Subject: [Intel-gfx] [PATCH 13/14] drm/msm: Add hdcp register ranges to sc7180 device tree Date: Mon, 13 Sep 2021 13:57:44 -0400 [thread overview] Message-ID: <20210913175747.47456-14-sean@poorly.run> (raw) In-Reply-To: <20210913175747.47456-1-sean@poorly.run> From: Sean Paul <seanpaul@chromium.org> This patch adds the register ranges required for HDCP to the sc7180 device tree. These registers will be used to inject HDCP key as well as toggle HDCP on and off. Signed-off-by: Sean Paul <seanpaul@chromium.org> --- drivers/gpu/drm/msm/dp/dp_parser.c | 30 +++++++++++++++++++++++++++--- drivers/gpu/drm/msm/dp/dp_parser.h | 4 ++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c b/drivers/gpu/drm/msm/dp/dp_parser.c index 0519dd3ac3c3..4bbe2485ce3c 100644 --- a/drivers/gpu/drm/msm/dp/dp_parser.c +++ b/drivers/gpu/drm/msm/dp/dp_parser.c @@ -20,11 +20,19 @@ static const struct dp_regulator_cfg sdm845_dp_reg_cfg = { }; static int msm_dss_ioremap(struct platform_device *pdev, - struct dss_io_data *io_data) + struct dss_io_data *io_data, const char *name, + int fallback_idx) { struct resource *res = NULL; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name); + + /* Support dts which do not have named resources */ + if (!res) { + if (fallback_idx >= 0) + res = platform_get_resource(pdev, IORESOURCE_MEM, + fallback_idx); + } if (!res) { DRM_ERROR("%pS->%s: msm_dss_get_res failed\n", __builtin_return_address(0), __func__); @@ -55,6 +63,8 @@ static void dp_parser_unmap_io_resources(struct dp_parser *parser) { struct dp_io *io = &parser->io; + msm_dss_iounmap(&io->hdcp_tz); + msm_dss_iounmap(&io->hdcp_key); msm_dss_iounmap(&io->dp_controller); } @@ -64,12 +74,26 @@ static int dp_parser_ctrl_res(struct dp_parser *parser) struct platform_device *pdev = parser->pdev; struct dp_io *io = &parser->io; - rc = msm_dss_ioremap(pdev, &io->dp_controller); + rc = msm_dss_ioremap(pdev, &io->dp_controller, "dp_controller", 0); if (rc) { DRM_ERROR("unable to remap dp io resources, rc=%d\n", rc); goto err; } + rc = msm_dss_ioremap(pdev, &io->hdcp_key, "hdcp_key", -1); + if (rc) { + DRM_INFO("unable to remap dp hdcp resources, rc=%d\n", rc); + io->hdcp_key.base = NULL; + io->hdcp_key.len = 0; + } + + rc = msm_dss_ioremap(pdev, &io->hdcp_tz, "hdcp_tz", -1); + if (rc) { + DRM_INFO("unable to remap dp hdcp resources, rc=%d\n", rc); + io->hdcp_tz.base = NULL; + io->hdcp_tz.len = 0; + } + io->phy = devm_phy_get(&pdev->dev, "dp"); if (IS_ERR(io->phy)) { rc = PTR_ERR(io->phy); diff --git a/drivers/gpu/drm/msm/dp/dp_parser.h b/drivers/gpu/drm/msm/dp/dp_parser.h index 34b49628bbaf..09d876620175 100644 --- a/drivers/gpu/drm/msm/dp/dp_parser.h +++ b/drivers/gpu/drm/msm/dp/dp_parser.h @@ -62,10 +62,14 @@ struct dp_display_data { * struct dp_ctrl_resource - controller's IO related data * * @dp_controller: Display Port controller mapped memory address + * @hdcp_key: mapped memory for HDCP key ingestion + * @hdcp_tz: mapped memory for HDCP TZ interaction * @phy_io: phy's mapped memory address */ struct dp_io { struct dss_io_data dp_controller; + struct dss_io_data hdcp_key; + struct dss_io_data hdcp_tz; struct phy *phy; union phy_configure_opts phy_opts; }; -- Sean Paul, Software Engineer, Google / Chromium OS
next prev parent reply other threads:[~2021-09-13 17:58 UTC|newest] Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-13 17:57 [PATCH 00/14] drm/hdcp: Pull HDCP auth/exchange/check into Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 01/14] drm/hdcp: Add drm_hdcp_atomic_check() Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 02/14] drm/hdcp: Avoid changing crtc state in hdcp atomic check Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 03/14] drm/hdcp: Update property value on content type and user changes Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 04/14] drm/hdcp: Expand HDCP helper library for enable/disable/check Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-14 7:39 ` kernel test robot 2021-09-14 7:39 ` kernel test robot 2021-09-13 17:57 ` [PATCH 05/14] drm/i915/hdcp: Consolidate HDCP setup/state cache Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 06/14] drm/i915/hdcp: Retain hdcp_capable return codes Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 07/14] drm/i915/hdcp: Use HDCP helpers for i915 Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-14 2:42 ` kernel test robot 2021-09-14 2:42 ` kernel test robot 2021-09-13 17:57 ` [PATCH 08/14] drm/msm/dpu_kms: Re-order dpu includes Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 09/14] drm/msm/dpu: Remove useless checks in dpu_encoder Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 10/14] drm/msm/dpu: Remove encoder->enable() hack Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 11/14] drm/msm/dp: Re-order dp_audio_put in deinit_sub_modules Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 17:57 ` [PATCH 12/14] dt-bindings: msm/dp: Add bindings for HDCP registers Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 21:31 ` Rob Herring 2021-09-13 21:31 ` [Intel-gfx] " Rob Herring 2021-09-14 1:23 ` Stephen Boyd 2021-09-14 1:23 ` [Intel-gfx] " Stephen Boyd 2021-09-14 1:23 ` Stephen Boyd 2021-09-13 17:57 ` Sean Paul [this message] 2021-09-13 17:57 ` [Intel-gfx] [PATCH 13/14] drm/msm: Add hdcp register ranges to sc7180 device tree Sean Paul 2021-09-14 1:28 ` Stephen Boyd 2021-09-14 1:28 ` [Intel-gfx] " Stephen Boyd 2021-09-14 1:28 ` Stephen Boyd 2021-09-13 17:57 ` [PATCH 14/14] drm/msm: Implement HDCP 1.x using the new drm HDCP helpers Sean Paul 2021-09-13 17:57 ` [Intel-gfx] " Sean Paul 2021-09-13 18:05 ` [PATCH 00/14] drm/hdcp: Pull HDCP auth/exchange/check into Alex Deucher 2021-09-13 18:05 ` [Intel-gfx] " Alex Deucher 2021-09-13 19:26 ` Sean Paul 2021-09-13 19:26 ` [Intel-gfx] " Sean Paul 2021-09-13 21:08 ` Harry Wentland 2021-09-13 21:08 ` [Intel-gfx] " Harry Wentland 2021-09-13 21:18 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " 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=20210913175747.47456-14-sean@poorly.run \ --to=sean@poorly.run \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=freedreno@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=robdclark@gmail.com \ --cc=seanpaul@chromium.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.