Re: [PATCH 1/7] gpu: host1x: Resize channel register region on Tegra186 and later

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 23, 2018 at 7:31 AM Thierry Reding <thierry.reding@xxxxxxxxx> wrote:
>
> From: Thierry Reding <treding@xxxxxxxxxx>
>
> The register region allocated per channel was decreased from 16384 bytes
> to 256 bytes on Tegra186 and later. Resize the region to make sure every
> channel (instead of only the first) is properly programmed.
>
> Suggested-by: Mikko Perttunen <mperttunen@xxxxxxxxxx>
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
> ---
>  drivers/gpu/host1x/hw/channel_hw.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c
> index d188f9068b91..95ea81172a83 100644
> --- a/drivers/gpu/host1x/hw/channel_hw.c
> +++ b/drivers/gpu/host1x/hw/channel_hw.c
> @@ -26,7 +26,6 @@
>  #include "../intr.h"
>  #include "../job.h"
>
> -#define HOST1X_CHANNEL_SIZE 16384
>  #define TRACE_MAX_LENGTH 128U
>
>  static void trace_write_gather(struct host1x_cdma *cdma, struct host1x_bo *bo,
> @@ -203,7 +202,11 @@ static void enable_gather_filter(struct host1x *host,
>  static int host1x_channel_init(struct host1x_channel *ch, struct host1x *dev,
>                                unsigned int index)
>  {
> -       ch->regs = dev->regs + index * HOST1X_CHANNEL_SIZE;
> +#if HOST1X_HW < 6
> +       ch->regs = dev->regs + index * 0x4000;
> +#else
> +       ch->regs = dev->regs + index * 0x100;
> +#endif

Just an observation ... this makes it impossible to build this module
for multiple host1x hw revisions in the same kernel. I believe that
supporting multiple platforms is frequently desirable, but perhaps
there's more going on here (like arm64 vs arm32, etc).

Cheers,

  -ilia
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux