Skip to content

Commit

Permalink
Merge branch 'linux-4.4' of git://anongit.freedesktop.org/git/nouveau…
Browse files Browse the repository at this point in the history
…/linux-2.6 into drm-fixes

Ben Skeggs wrote:
A couple of regression fixes, some more boards whitelisted for a hw bug
workaround, gr/ucode fixes for hangs a user is seeing.

The changes look larger than they actually are due to the ucode binaries
(*.fucN.h) being regenerated.

* 'linux-4.4' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau/volt/pwm/gk104: fix an off-by-one resulting in the voltage not being set
  drm/nouveau/nvif: allow userspace access to its own client object
  drm/nouveau/gr/gf100-: fix oops when calling zbc methods
  drm/nouveau/gr/gf117-: assume no PPC if NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK is zero
  drm/nouveau/gr/gf117-: read NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK from correct GPC
  drm/nouveau/gr/gf100-: split out per-gpc address calculation macro
  drm/nouveau/bios: return actual size of the buffer retrieved via _ROM
  drm/nouveau/instmem: protect instobj list with a spinlock
  drm/nouveau/pci: enable c800 magic for some unknown Samsung laptop
  drm/nouveau/pci: enable c800 magic for Clevo P157SM
  • Loading branch information
airlied committed Nov 27, 2015
2 parents 2f13716 + ef0e9f5 commit 8c14f72
Show file tree
Hide file tree
Showing 16 changed files with 948 additions and 917 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ struct nvkm_instmem {
const struct nvkm_instmem_func *func;
struct nvkm_subdev subdev;

spinlock_t lock;
struct list_head list;
u32 reserved;

Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/nouveau_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ static int nouveau_rom_call(acpi_handle rom_handle, uint8_t *bios,
return -ENODEV;
}
obj = (union acpi_object *)buffer.pointer;
len = min(len, (int)obj->buffer.length);
memcpy(bios+offset, obj->buffer.pointer, len);
kfree(buffer.pointer);
return len;
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include <nvif/client.h>
#include <nvif/device.h>
#include <nvif/ioctl.h>

#include <drmP.h>

Expand All @@ -65,9 +66,10 @@ struct nouveau_drm_tile {
};

enum nouveau_drm_object_route {
NVDRM_OBJECT_NVIF = 0,
NVDRM_OBJECT_NVIF = NVIF_IOCTL_V0_OWNER_NVIF,
NVDRM_OBJECT_USIF,
NVDRM_OBJECT_ABI16,
NVDRM_OBJECT_ANY = NVIF_IOCTL_V0_OWNER_ANY,
};

enum nouveau_drm_notify_route {
Expand Down
5 changes: 4 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_usif.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ usif_ioctl(struct drm_file *filp, void __user *user, u32 argc)
if (nvif_unpack(argv->v0, 0, 0, true)) {
/* block access to objects not created via this interface */
owner = argv->v0.owner;
argv->v0.owner = NVDRM_OBJECT_USIF;
if (argv->v0.object == 0ULL)
argv->v0.owner = NVDRM_OBJECT_ANY; /* except client */
else
argv->v0.owner = NVDRM_OBJECT_USIF;
} else
goto done;

Expand Down
16 changes: 14 additions & 2 deletions drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ nvkm_device_pci_10de_0fe3[] = {
{}
};

static const struct nvkm_device_pci_vendor
nvkm_device_pci_10de_0fe4[] = {
{ 0x144d, 0xc740, NULL, { .War00C800_0 = true } },
{}
};

static const struct nvkm_device_pci_vendor
nvkm_device_pci_10de_104b[] = {
{ 0x1043, 0x844c, "GeForce GT 625" },
Expand Down Expand Up @@ -688,6 +694,12 @@ nvkm_device_pci_10de_1199[] = {
{}
};

static const struct nvkm_device_pci_vendor
nvkm_device_pci_10de_11e0[] = {
{ 0x1558, 0x5106, NULL, { .War00C800_0 = true } },
{}
};

static const struct nvkm_device_pci_vendor
nvkm_device_pci_10de_11e3[] = {
{ 0x17aa, 0x3683, "GeForce GTX 760A" },
Expand Down Expand Up @@ -1370,7 +1382,7 @@ nvkm_device_pci_10de[] = {
{ 0x0fe1, "GeForce GT 730M" },
{ 0x0fe2, "GeForce GT 745M" },
{ 0x0fe3, "GeForce GT 745M", nvkm_device_pci_10de_0fe3 },
{ 0x0fe4, "GeForce GT 750M" },
{ 0x0fe4, "GeForce GT 750M", nvkm_device_pci_10de_0fe4 },
{ 0x0fe9, "GeForce GT 750M" },
{ 0x0fea, "GeForce GT 755M" },
{ 0x0fec, "GeForce 710A" },
Expand Down Expand Up @@ -1485,7 +1497,7 @@ nvkm_device_pci_10de[] = {
{ 0x11c6, "GeForce GTX 650 Ti" },
{ 0x11c8, "GeForce GTX 650" },
{ 0x11cb, "GeForce GT 740" },
{ 0x11e0, "GeForce GTX 770M" },
{ 0x11e0, "GeForce GTX 770M", nvkm_device_pci_10de_11e0 },
{ 0x11e1, "GeForce GTX 765M" },
{ 0x11e2, "GeForce GTX 765M" },
{ 0x11e3, "GeForce GTX 760M", nvkm_device_pci_10de_11e3 },
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ gf117_grctx_generate_attrib(struct gf100_grctx *info)
const u32 b = beta * gr->ppc_tpc_nr[gpc][ppc];
const u32 t = timeslice_mode;
const u32 o = PPC_UNIT(gpc, ppc, 0);
if (!(gr->ppc_mask[gpc] & (1 << ppc)))
continue;
mmio_skip(info, o + 0xc0, (t << 28) | (b << 16) | ++bo);
mmio_wr32(info, o + 0xc0, (t << 28) | (b << 16) | --bo);
bo += grctx->attrib_nr_max * gr->ppc_tpc_nr[gpc][ppc];
Expand Down
8 changes: 5 additions & 3 deletions drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ mmio_list_base:
#endif

#ifdef INCLUDE_CODE
#define gpc_addr(reg,addr) /*
*/ imm32(reg,addr) /*
*/ or reg NV_PGRAPH_GPCX_GPCCS_MMIO_CTRL_BASE_ENABLE
#define gpc_wr32(addr,reg) /*
*/ gpc_addr($r14,addr) /*
*/ mov b32 $r15 reg /*
*/ imm32($r14, addr) /*
*/ or $r14 NV_PGRAPH_GPCX_GPCCS_MMIO_CTRL_BASE_ENABLE /*
*/ call(nv_wr32)

// reports an exception to the host
Expand Down Expand Up @@ -161,7 +163,7 @@ init:

#if NV_PGRAPH_GPCX_UNK__SIZE > 0
// figure out which, and how many, UNKs are actually present
imm32($r14, 0x500c30)
gpc_addr($r14, 0x500c30)
clear b32 $r2
clear b32 $r3
clear b32 $r4
Expand Down
Loading

0 comments on commit 8c14f72

Please sign in to comment.