dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Lucas Stach <l.stach@pengutronix.de>, dri-devel@lists.freedesktop.org
Cc: Russell King <linux+etnaviv@armlinux.org.uk>
Subject: Re: [PATCH] drm/etnaviv: move linear window on MC1.0 parts if necessary
Date: Fri, 2 Dec 2016 13:06:24 +0100	[thread overview]
Message-ID: <1fea84d3-ec56-5a7c-c36d-52a6d808ef83@denx.de> (raw)
In-Reply-To: <20161202112930.26013-1-l.stach@pengutronix.de>

On 12/02/2016 12:29 PM, Lucas Stach wrote:
> On i.MX6SX the physical memory is placed above the 2GB mark, so the GPU
> linear window has to be moved for the GPU to work at all. This doesn't
> mix with the FAST_CLEAR feature, as the TS unit doesn't take the linear
> window offset into account and will corrupt memory when used with a
> non-zero offset.
> 
> Move the linear window if it's necessary for the GPU to work, but avoid
> announcing FAST_CLEAR support to userspace in this case.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

On MX6SX:
Tested-by: Marek Vasut <marex@denx.de>

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index b1254f885fed..4b697ad8bd64 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -639,6 +639,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>  			gpu->memory_base = PHYS_OFFSET;
>  		else
>  			gpu->memory_base = dma_mask - SZ_2G + 1;
> +	} else if (PHYS_OFFSET >= SZ_2G) {
> +		dev_info(gpu->dev, "Need to move linear window on MC1.0, disabling TS\n");
> +		gpu->memory_base = PHYS_OFFSET;
> +		gpu->identity.features &= ~chipFeatures_FAST_CLEAR;
>  	}
>  
>  	ret = etnaviv_hw_reset(gpu);
> 


-- 
Best regards,
Marek Vasut
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2016-12-02 12:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 11:29 [PATCH] drm/etnaviv: move linear window on MC1.0 parts if necessary Lucas Stach
2016-12-02 12:06 ` Marek Vasut [this message]

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=1fea84d3-ec56-5a7c-c36d-52a6d808ef83@denx.de \
    --to=marex@denx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux+etnaviv@armlinux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).