mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nouveau/ttm: fix tiled system memory with Maxwell
@ 2015-07-08  7:13 Alexandre Courbot
  2015-07-09  8:16 ` Alexandre Courbot
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Courbot @ 2015-07-08  7:13 UTC (permalink / raw)
  To: Ben Skeggs, nouveau; +Cc: linux-tegra, linux-kernel, gnurou, Alexandre Courbot

Add Maxwell to the switch statement that sets node->memtype, otherwise
all tiling information is ignored for buffers in system memory.

While we are at it, make that switch statement explicitly complain the
next time we meet a non-handled card family.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 drm/nouveau/nouveau_ttm.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drm/nouveau/nouveau_ttm.c b/drm/nouveau/nouveau_ttm.c
index 18f449715788..69bec1058039 100644
--- a/drm/nouveau/nouveau_ttm.c
+++ b/drm/nouveau/nouveau_ttm.c
@@ -175,15 +175,24 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
 	node->page_shift = 12;
 
 	switch (drm->device.info.family) {
+	case NV_DEVICE_INFO_V0_TNT:
+	case NV_DEVICE_INFO_V0_CELSIUS:
+	case NV_DEVICE_INFO_V0_KELVIN:
+	case NV_DEVICE_INFO_V0_RANKINE:
+	case NV_DEVICE_INFO_V0_CURIE:
+		break;
 	case NV_DEVICE_INFO_V0_TESLA:
 		if (drm->device.info.chipset != 0x50)
 			node->memtype = (nvbo->tile_flags & 0x7f00) >> 8;
 		break;
 	case NV_DEVICE_INFO_V0_FERMI:
 	case NV_DEVICE_INFO_V0_KEPLER:
+	case NV_DEVICE_INFO_V0_MAXWELL:
 		node->memtype = (nvbo->tile_flags & 0xff00) >> 8;
 		break;
 	default:
+		NV_WARN(drm, "%s: unhandled family type %x\n",
+			drm->device.info.family);
 		break;
 	}
 
-- 
2.4.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] nouveau/ttm: fix tiled system memory with Maxwell
  2015-07-08  7:13 [PATCH] nouveau/ttm: fix tiled system memory with Maxwell Alexandre Courbot
@ 2015-07-09  8:16 ` Alexandre Courbot
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Courbot @ 2015-07-09  8:16 UTC (permalink / raw)
  To: Alexandre Courbot
  Cc: Ben Skeggs, nouveau, linux-tegra, Linux Kernel Mailing List

Withdrawing this patch which triggered a warning due to a missing
argument to NV_WARN. Sent v2 which addresses this. Sorry for the
noise.

On Wed, Jul 8, 2015 at 4:13 PM, Alexandre Courbot <acourbot@nvidia.com> wrote:
> Add Maxwell to the switch statement that sets node->memtype, otherwise
> all tiling information is ignored for buffers in system memory.
>
> While we are at it, make that switch statement explicitly complain the
> next time we meet a non-handled card family.
>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
>  drm/nouveau/nouveau_ttm.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drm/nouveau/nouveau_ttm.c b/drm/nouveau/nouveau_ttm.c
> index 18f449715788..69bec1058039 100644
> --- a/drm/nouveau/nouveau_ttm.c
> +++ b/drm/nouveau/nouveau_ttm.c
> @@ -175,15 +175,24 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
>         node->page_shift = 12;
>
>         switch (drm->device.info.family) {
> +       case NV_DEVICE_INFO_V0_TNT:
> +       case NV_DEVICE_INFO_V0_CELSIUS:
> +       case NV_DEVICE_INFO_V0_KELVIN:
> +       case NV_DEVICE_INFO_V0_RANKINE:
> +       case NV_DEVICE_INFO_V0_CURIE:
> +               break;
>         case NV_DEVICE_INFO_V0_TESLA:
>                 if (drm->device.info.chipset != 0x50)
>                         node->memtype = (nvbo->tile_flags & 0x7f00) >> 8;
>                 break;
>         case NV_DEVICE_INFO_V0_FERMI:
>         case NV_DEVICE_INFO_V0_KEPLER:
> +       case NV_DEVICE_INFO_V0_MAXWELL:
>                 node->memtype = (nvbo->tile_flags & 0xff00) >> 8;
>                 break;
>         default:
> +               NV_WARN(drm, "%s: unhandled family type %x\n",
> +                       drm->device.info.family);
>                 break;
>         }
>
> --
> 2.4.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-09  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08  7:13 [PATCH] nouveau/ttm: fix tiled system memory with Maxwell Alexandre Courbot
2015-07-09  8:16 ` Alexandre Courbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®