Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse@codeaurora.org>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 5/7] drm/msm: add chip-id param
Date: Mon, 10 Mar 2014 14:20:48 -0600	[thread overview]
Message-ID: <531E1EA0.4070705@codeaurora.org> (raw)
In-Reply-To: <1394470062-27442-6-git-send-email-robdclark@gmail.com>

On 03/10/2014 10:47 AM, Rob Clark wrote:
> Some of the w/a or different behavior of userspace blob driver seem to
> be keyed to gpu patch revision, rather than gpu-id.  So expose the full
> chip-id to userspace so it can DTRT.

It is all chip-id all the time in the blob - we used to try to be clever
with unique GPU IDs and such with it but we discovered over time that there
is just too much drama.

> Signed-off-by: Rob Clark <robdclark@gmail.com>

Acked-by: Jordan Crouse <jcrouse@codeaurora.org>

> ---
>   drivers/gpu/drm/msm/adreno/adreno_gpu.c | 6 ++++++
>   include/uapi/drm/msm_drm.h              | 1 +
>   2 files changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> index 7a11563..28ca8cd 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> @@ -73,6 +73,12 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
>   	case MSM_PARAM_GMEM_SIZE:
>   		*value = adreno_gpu->gmem;
>   		return 0;
> +	case MSM_PARAM_CHIP_ID:
> +		*value = adreno_gpu->rev.patchid |
> +				(adreno_gpu->rev.minor << 8) |
> +				(adreno_gpu->rev.major << 16) |
> +				(adreno_gpu->rev.core << 24);
> +		return 0;
>   	default:
>   		DBG("%s: invalid param: %u", gpu->name, param);
>   		return -EINVAL;
> diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
> index d3c6207..bf91a78 100644
> --- a/include/uapi/drm/msm_drm.h
> +++ b/include/uapi/drm/msm_drm.h
> @@ -50,6 +50,7 @@ struct drm_msm_timespec {
>
>   #define MSM_PARAM_GPU_ID     0x01
>   #define MSM_PARAM_GMEM_SIZE  0x02
> +#define MSM_PARAM_CHIP_ID    0x03
>
>   struct drm_msm_param {
>   	uint32_t pipe;           /* in, MSM_PIPE_x */
>


-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  reply	other threads:[~2014-03-10 20:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 16:47 [PATCH 0/7] drm/msm: what's in store for 3.15 Rob Clark
2014-03-10 16:47 ` [PATCH 1/7] drm/msm: hdmi audio support Rob Clark
2014-03-10 16:47 ` [PATCH 2/7] drm/msm: add hang_debug module param Rob Clark
2014-03-10 20:17   ` Jordan Crouse
2014-03-10 20:27     ` Rob Clark
2014-03-10 16:47 ` [PATCH 3/7] drm/msm: spin helper Rob Clark
2014-03-10 20:27   ` Jordan Crouse
2014-03-10 16:47 ` [PATCH 4/7] drm/msm: crank down gpu when inactive Rob Clark
2014-03-10 20:24   ` Jordan Crouse
2014-03-10 20:39     ` Rob Clark
2014-03-10 16:47 ` [PATCH 5/7] drm/msm: add chip-id param Rob Clark
2014-03-10 20:20   ` Jordan Crouse [this message]
2014-03-10 16:47 ` [PATCH 6/7] drm/msm: use componentised device support Rob Clark
2014-03-10 16:47 ` [PATCH 7/7] drm/msm: validate flags, etc Rob Clark
2014-03-10 20:22   ` Jordan Crouse

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=531E1EA0.4070705@codeaurora.org \
    --to=jcrouse@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.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