From: Jordan Crouse <jcrouse@codeaurora.org>
To: Jonathan Marek <jonathan@marek.ca>
Cc: freedreno@lists.freedesktop.org, Rob Clark <robdclark@gmail.com>,
David Airlie <airlied@linux.ie>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Niklas Cassel <niklas.cassel@linaro.org>,
Andy Gross <andy.gross@linaro.org>,
Govind Singh <govinds@codeaurora.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<linux-arm-msm@vger.kernel.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<dri-devel@lists.freedesktop.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/9] drm/msm: add headless gpu device (for imx5)
Date: Wed, 14 Nov 2018 15:47:29 -0700 [thread overview]
Message-ID: <20181114224729.GA6285@jcrouse-lnx.qualcomm.com> (raw)
In-Reply-To: <20181114222418.15960-5-jonathan@marek.ca>
Thanks for the patch. Perhaps a small blurb here for the commit log to let
folks know what your intent was.
On Wed, Nov 14, 2018 at 05:24:12PM -0500, Jonathan Marek wrote:
> Signed-off-by: Jonathan Marek <jonathan@marek.ca>
> ---
> drivers/gpu/drm/msm/Kconfig | 4 ++--
> drivers/gpu/drm/msm/msm_debugfs.c | 2 +-
> drivers/gpu/drm/msm/msm_drv.c | 15 +++++++++++----
> include/linux/qcom_scm.h | 3 +++
> 4 files changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
> index 843a9d40c05e..cf549f1ed403 100644
> --- a/drivers/gpu/drm/msm/Kconfig
> +++ b/drivers/gpu/drm/msm/Kconfig
> @@ -2,7 +2,7 @@
> config DRM_MSM
> tristate "MSM DRM"
> depends on DRM
> - depends on ARCH_QCOM || (ARM && COMPILE_TEST)
> + depends on ARCH_QCOM || SOC_IMX5 || (ARM && COMPILE_TEST)
> depends on OF && COMMON_CLK
> depends on MMU
> select QCOM_MDT_LOADER if ARCH_QCOM
> @@ -11,7 +11,7 @@ config DRM_MSM
> select DRM_PANEL
> select SHMEM
> select TMPFS
> - select QCOM_SCM
> + select QCOM_SCM if ARCH_QCOM
> select WANT_DEV_COREDUMP
> select SND_SOC_HDMI_CODEC if SND_SOC
> select SYNC_FILE
> diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c
> index f0da0d3c8a80..1ca99ca356a4 100644
> --- a/drivers/gpu/drm/msm/msm_debugfs.c
> +++ b/drivers/gpu/drm/msm/msm_debugfs.c
> @@ -235,7 +235,7 @@ int msm_debugfs_init(struct drm_minor *minor)
> debugfs_create_file("gpu", S_IRUSR, minor->debugfs_root,
> dev, &msm_gpu_fops);
>
> - if (priv->kms->funcs->debugfs_init) {
> + if (priv->kms && priv->kms->funcs->debugfs_init) {
> ret = priv->kms->funcs->debugfs_init(priv->kms, minor);
> if (ret)
> return ret;
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 9f219e02f3c7..a10cc0298d38 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -344,6 +344,7 @@ static int msm_drm_uninit(struct device *dev)
> return 0;
> }
>
> +#define KMS_HEADLESS 1
> #define KMS_MDP4 4
> #define KMS_MDP5 5
> #define KMS_DPU 3
> @@ -495,6 +496,9 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
> msm_gem_shrinker_init(ddev);
>
> switch (get_mdp_ver(pdev)) {
> + case KMS_HEADLESS:
> + priv->kms = kms = NULL;
I don't think you need to set priv->kms, it should come in as NULL. I would
normally say that you should set kms to NULL when it is declared, but I kind of
like pointing it out to the user.
> + break;
> case KMS_MDP4:
> kms = mdp4_kms_init(ddev);
> priv->kms = kms;
> @@ -633,7 +637,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
> drm_mode_config_reset(ddev);
>
> #ifdef CONFIG_DRM_FBDEV_EMULATION
> - if (fbdev)
> + if (kms && fbdev)
> priv->fbdev = msm_fbdev_init(ddev);
> #endif
>
> @@ -1315,9 +1319,11 @@ static int msm_pdev_probe(struct platform_device *pdev)
> struct component_match *match = NULL;
> int ret;
>
> - ret = add_display_components(&pdev->dev, &match);
> - if (ret)
> - return ret;
> + if (get_mdp_ver(pdev) != KMS_HEADLESS) {
> + ret = add_display_components(&pdev->dev, &match);
> + if (ret)
> + return ret;
> + }
>
> ret = add_gpu_components(&pdev->dev, &match);
> if (ret)
> @@ -1342,6 +1348,7 @@ static int msm_pdev_remove(struct platform_device *pdev)
> }
>
> static const struct of_device_id dt_match[] = {
> + { .compatible = "qcom,adreno-headless", .data = (void *)KMS_HEADLESS },
> { .compatible = "qcom,mdp4", .data = (void *)KMS_MDP4 },
> { .compatible = "qcom,mdss", .data = (void *)KMS_MDP5 },
> { .compatible = "qcom,sdm845-mdss", .data = (void *)KMS_DPU },
> diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h
> index 06996ad4f2bc..1637385bcc17 100644
> --- a/include/linux/qcom_scm.h
> +++ b/include/linux/qcom_scm.h
> @@ -67,6 +67,9 @@ extern int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare);
> extern int qcom_scm_io_readl(phys_addr_t addr, unsigned int *val);
> extern int qcom_scm_io_writel(phys_addr_t addr, unsigned int val);
> #else
> +
> +#include <linux/errno.h>
> +
This looks like a separate patch, albeit a useful one.
> static inline
> int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
> {
Jordan
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-11-14 22:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 22:24 [PATCH 1/9] drm/msm/mdp4: only use lut_clk on mdp4.2+ Jonathan Marek
2018-11-14 22:24 ` [PATCH 2/9] drm/msm/mdp4: allocate blank_cursor_no with MSM_BO_SCANOUT flag Jonathan Marek
2018-11-14 22:24 ` [PATCH 3/9] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment Jonathan Marek
2018-11-14 22:24 ` [PATCH 4/9] drm/msm: use contiguous vram for MSM_BO_SCANOUT when possible Jonathan Marek
2018-11-14 22:24 ` [PATCH 5/9] drm/msm: add headless gpu device (for imx5) Jonathan Marek
2018-11-14 22:47 ` Jordan Crouse [this message]
2018-11-14 23:08 ` Jonathan marek
2018-11-14 22:24 ` [PATCH 6/9] drm/msm/adreno: add a2xx Jonathan Marek
2018-11-14 22:59 ` Jordan Crouse
2018-11-14 22:24 ` [PATCH 7/9] drm/msm: implement a2xx mmu Jonathan Marek
2018-11-20 16:29 ` Rob Clark
2018-11-14 22:24 ` [PATCH 8/9] drm/msm/mdp5: add config for msm8917 Jonathan Marek
2018-11-14 22:24 ` [PATCH 9/9] drm/msm: set priv->kms to NULL before uninit Jonathan Marek
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=20181114224729.GA6285@jcrouse-lnx.qualcomm.com \
--to=jcrouse@codeaurora.org \
--cc=airlied@linux.ie \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=govinds@codeaurora.org \
--cc=jonathan@marek.ca \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=niklas.cassel@linaro.org \
--cc=robdclark@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