mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
Merge branch '04.01-ampere-lite' of git://github.com/skeggsb/linux into drm-fixes
Mostly a regression fixes here, a couple of which could lead to display hanging, and have been affecting a number of users. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Ben Skeggs <skeggsb@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv4Y0ZiAevSvgphLAOaZjFi75ECXqUD9ShBvRxZ6S-pb9Q@mail.gmail.com
This commit is contained in:
commit
87bff75800
@ -88,7 +88,11 @@ base507c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
|
||||
NVVAL(NV507C, SET_CONVERSION, OFS, 0x64));
|
||||
} else {
|
||||
PUSH_MTHD(push, NV507C, SET_PROCESSING,
|
||||
NVDEF(NV507C, SET_PROCESSING, USE_GAIN_OFS, DISABLE));
|
||||
NVDEF(NV507C, SET_PROCESSING, USE_GAIN_OFS, DISABLE),
|
||||
|
||||
SET_CONVERSION,
|
||||
NVVAL(NV507C, SET_CONVERSION, GAIN, 0) |
|
||||
NVVAL(NV507C, SET_CONVERSION, OFS, 0));
|
||||
}
|
||||
|
||||
PUSH_MTHD(push, NV507C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8);
|
||||
|
@ -49,7 +49,11 @@ base827c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
|
||||
NVVAL(NV827C, SET_CONVERSION, OFS, 0x64));
|
||||
} else {
|
||||
PUSH_MTHD(push, NV827C, SET_PROCESSING,
|
||||
NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE));
|
||||
NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE),
|
||||
|
||||
SET_CONVERSION,
|
||||
NVVAL(NV827C, SET_CONVERSION, GAIN, 0) |
|
||||
NVVAL(NV827C, SET_CONVERSION, OFS, 0));
|
||||
}
|
||||
|
||||
PUSH_MTHD(push, NV827C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8,
|
||||
|
@ -2663,6 +2663,14 @@ nv50_display_create(struct drm_device *dev)
|
||||
else
|
||||
nouveau_display(dev)->format_modifiers = disp50xx_modifiers;
|
||||
|
||||
if (disp->disp->object.oclass >= GK104_DISP) {
|
||||
dev->mode_config.cursor_width = 256;
|
||||
dev->mode_config.cursor_height = 256;
|
||||
} else {
|
||||
dev->mode_config.cursor_width = 64;
|
||||
dev->mode_config.cursor_height = 64;
|
||||
}
|
||||
|
||||
/* create crtc objects to represent the hw heads */
|
||||
if (disp->disp->object.oclass >= GV100_DISP)
|
||||
crtcs = nvif_rd32(&device->object, 0x610060) & 0xff;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "head.h"
|
||||
#include "core.h"
|
||||
|
||||
#include "nvif/push.h"
|
||||
#include <nvif/push507c.h>
|
||||
|
||||
#include <nvhw/class/cl917d.h>
|
||||
@ -73,6 +74,31 @@ head917d_base(struct nv50_head *head, struct nv50_head_atom *asyh)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
head917d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
|
||||
{
|
||||
struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
|
||||
const int i = head->base.index;
|
||||
int ret;
|
||||
|
||||
ret = PUSH_WAIT(push, 5);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
PUSH_MTHD(push, NV917D, HEAD_SET_CONTROL_CURSOR(i),
|
||||
NVDEF(NV917D, HEAD_SET_CONTROL_CURSOR, ENABLE, ENABLE) |
|
||||
NVVAL(NV917D, HEAD_SET_CONTROL_CURSOR, FORMAT, asyh->curs.format) |
|
||||
NVVAL(NV917D, HEAD_SET_CONTROL_CURSOR, SIZE, asyh->curs.layout) |
|
||||
NVVAL(NV917D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_X, 0) |
|
||||
NVVAL(NV917D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_Y, 0) |
|
||||
NVDEF(NV917D, HEAD_SET_CONTROL_CURSOR, COMPOSITION, ALPHA_BLEND),
|
||||
|
||||
HEAD_SET_OFFSET_CURSOR(i), asyh->curs.offset >> 8);
|
||||
|
||||
PUSH_MTHD(push, NV917D, HEAD_SET_CONTEXT_DMA_CURSOR(i), asyh->curs.handle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
head917d_curs_layout(struct nv50_head *head, struct nv50_wndw_atom *asyw,
|
||||
struct nv50_head_atom *asyh)
|
||||
@ -101,7 +127,7 @@ head917d = {
|
||||
.core_clr = head907d_core_clr,
|
||||
.curs_layout = head917d_curs_layout,
|
||||
.curs_format = head507d_curs_format,
|
||||
.curs_set = head907d_curs_set,
|
||||
.curs_set = head917d_curs_set,
|
||||
.curs_clr = head907d_curs_clr,
|
||||
.base = head917d_base,
|
||||
.ovly = head907d_ovly,
|
||||
|
@ -702,6 +702,11 @@ nv50_wndw_init(struct nv50_wndw *wndw)
|
||||
nvif_notify_get(&wndw->notify);
|
||||
}
|
||||
|
||||
static const u64 nv50_cursor_format_modifiers[] = {
|
||||
DRM_FORMAT_MOD_LINEAR,
|
||||
DRM_FORMAT_MOD_INVALID,
|
||||
};
|
||||
|
||||
int
|
||||
nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
|
||||
enum drm_plane_type type, const char *name, int index,
|
||||
@ -713,6 +718,7 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
|
||||
struct nvif_mmu *mmu = &drm->client.mmu;
|
||||
struct nv50_disp *disp = nv50_disp(dev);
|
||||
struct nv50_wndw *wndw;
|
||||
const u64 *format_modifiers;
|
||||
int nformat;
|
||||
int ret;
|
||||
|
||||
@ -728,10 +734,13 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
|
||||
|
||||
for (nformat = 0; format[nformat]; nformat++);
|
||||
|
||||
ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw,
|
||||
format, nformat,
|
||||
nouveau_display(dev)->format_modifiers,
|
||||
type, "%s-%d", name, index);
|
||||
if (type == DRM_PLANE_TYPE_CURSOR)
|
||||
format_modifiers = nv50_cursor_format_modifiers;
|
||||
else
|
||||
format_modifiers = nouveau_display(dev)->format_modifiers;
|
||||
|
||||
ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw, format, nformat,
|
||||
format_modifiers, type, "%s-%d", name, index);
|
||||
if (ret) {
|
||||
kfree(*pwndw);
|
||||
*pwndw = NULL;
|
||||
|
@ -66,6 +66,10 @@
|
||||
#define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_ALPHA_BLEND (0x00000000)
|
||||
#define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_PREMULT_ALPHA_BLEND (0x00000001)
|
||||
#define NV917D_HEAD_SET_CONTROL_CURSOR_COMPOSITION_XOR (0x00000002)
|
||||
#define NV917D_HEAD_SET_OFFSET_CURSOR(a) (0x00000484 + (a)*0x00000300)
|
||||
#define NV917D_HEAD_SET_OFFSET_CURSOR_ORIGIN 31:0
|
||||
#define NV917D_HEAD_SET_CONTEXT_DMA_CURSOR(a) (0x0000048C + (a)*0x00000300)
|
||||
#define NV917D_HEAD_SET_CONTEXT_DMA_CURSOR_HANDLE 31:0
|
||||
#define NV917D_HEAD_SET_DITHER_CONTROL(a) (0x000004A0 + (a)*0x00000300)
|
||||
#define NV917D_HEAD_SET_DITHER_CONTROL_ENABLE 0:0
|
||||
#define NV917D_HEAD_SET_DITHER_CONTROL_ENABLE_DISABLE (0x00000000)
|
||||
|
@ -123,131 +123,131 @@ PUSH_KICK(struct nvif_push *push)
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#define PUSH_1(X,f,ds,n,c,o,p,s,mA,dA) do { \
|
||||
PUSH_##o##_HDR((p), s, mA, (c)+(n)); \
|
||||
PUSH_##f(X, (p), X##mA, 1, o, (dA), ds, ""); \
|
||||
#define PUSH_1(X,f,ds,n,o,p,s,mA,dA) do { \
|
||||
PUSH_##o##_HDR((p), s, mA, (ds)+(n)); \
|
||||
PUSH_##f(X, (p), X##mA, 1, o, (dA), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_2(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (1?PUSH_##o##_INC), "mthd1"); \
|
||||
PUSH_1(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_2(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (1?PUSH_##o##_INC), "mthd1"); \
|
||||
PUSH_1(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_3(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd2"); \
|
||||
PUSH_2(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_3(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd2"); \
|
||||
PUSH_2(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_4(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd3"); \
|
||||
PUSH_3(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_4(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd3"); \
|
||||
PUSH_3(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_5(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd4"); \
|
||||
PUSH_4(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_5(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd4"); \
|
||||
PUSH_4(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_6(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd5"); \
|
||||
PUSH_5(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_6(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd5"); \
|
||||
PUSH_5(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_7(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd6"); \
|
||||
PUSH_6(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_7(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd6"); \
|
||||
PUSH_6(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_8(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd7"); \
|
||||
PUSH_7(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_8(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd7"); \
|
||||
PUSH_7(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_9(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd8"); \
|
||||
PUSH_8(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_9(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd8"); \
|
||||
PUSH_8(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
#define PUSH_10(X,f,ds,n,c,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd9"); \
|
||||
PUSH_9(X, DATA_, 1, ds, (c)+(n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
#define PUSH_10(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
|
||||
PUSH_ASSERT((mB) - (mA) == (0?PUSH_##o##_INC), "mthd9"); \
|
||||
PUSH_9(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
|
||||
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
|
||||
} while(0)
|
||||
|
||||
#define PUSH_1D(X,o,p,s,mA,dA) \
|
||||
PUSH_1(X, DATA_, 1, 1, 0, o, (p), s, X##mA, (dA))
|
||||
#define PUSH_2D(X,o,p,s,mA,dA,mB,dB) \
|
||||
PUSH_2(X, DATA_, 1, 1, 0, o, (p), s, X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_3D(X,o,p,s,mA,dA,mB,dB,mC,dC) \
|
||||
PUSH_3(X, DATA_, 1, 1, 0, o, (p), s, X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_4D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD) \
|
||||
PUSH_4(X, DATA_, 1, 1, 0, o, (p), s, X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_5D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE) \
|
||||
PUSH_5(X, DATA_, 1, 1, 0, o, (p), s, X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_1D(X,o,p,s,mA,dA) \
|
||||
PUSH_1(X, DATA_, 1, 0, o, (p), s, X##mA, (dA))
|
||||
#define PUSH_2D(X,o,p,s,mA,dA,mB,dB) \
|
||||
PUSH_2(X, DATA_, 1, 0, o, (p), s, X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_3D(X,o,p,s,mA,dA,mB,dB,mC,dC) \
|
||||
PUSH_3(X, DATA_, 1, 0, o, (p), s, X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_4D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD) \
|
||||
PUSH_4(X, DATA_, 1, 0, o, (p), s, X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_5D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE) \
|
||||
PUSH_5(X, DATA_, 1, 0, o, (p), s, X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_6D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF) \
|
||||
PUSH_6(X, DATA_, 1, 1, 0, o, (p), s, X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
PUSH_6(X, DATA_, 1, 0, o, (p), s, X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_7D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF,mG,dG) \
|
||||
PUSH_7(X, DATA_, 1, 1, 0, o, (p), s, X##mG, (dG), \
|
||||
X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
PUSH_7(X, DATA_, 1, 0, o, (p), s, X##mG, (dG), \
|
||||
X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_8D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF,mG,dG,mH,dH) \
|
||||
PUSH_8(X, DATA_, 1, 1, 0, o, (p), s, X##mH, (dH), \
|
||||
X##mG, (dG), \
|
||||
X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
PUSH_8(X, DATA_, 1, 0, o, (p), s, X##mH, (dH), \
|
||||
X##mG, (dG), \
|
||||
X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_9D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF,mG,dG,mH,dH,mI,dI) \
|
||||
PUSH_9(X, DATA_, 1, 1, 0, o, (p), s, X##mI, (dI), \
|
||||
X##mH, (dH), \
|
||||
X##mG, (dG), \
|
||||
X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
PUSH_9(X, DATA_, 1, 0, o, (p), s, X##mI, (dI), \
|
||||
X##mH, (dH), \
|
||||
X##mG, (dG), \
|
||||
X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_10D(X,o,p,s,mA,dA,mB,dB,mC,dC,mD,dD,mE,dE,mF,dF,mG,dG,mH,dH,mI,dI,mJ,dJ) \
|
||||
PUSH_10(X, DATA_, 1, 1, 0, o, (p), s, X##mJ, (dJ), \
|
||||
X##mI, (dI), \
|
||||
X##mH, (dH), \
|
||||
X##mG, (dG), \
|
||||
X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
PUSH_10(X, DATA_, 1, 0, o, (p), s, X##mJ, (dJ), \
|
||||
X##mI, (dI), \
|
||||
X##mH, (dH), \
|
||||
X##mG, (dG), \
|
||||
X##mF, (dF), \
|
||||
X##mE, (dE), \
|
||||
X##mD, (dD), \
|
||||
X##mC, (dC), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
|
||||
#define PUSH_1P(X,o,p,s,mA,dp,ds) \
|
||||
PUSH_1(X, DATAp, ds, ds, 0, o, (p), s, X##mA, (dp))
|
||||
#define PUSH_2P(X,o,p,s,mA,dA,mB,dp,ds) \
|
||||
PUSH_2(X, DATAp, ds, ds, 0, o, (p), s, X##mB, (dp), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_3P(X,o,p,s,mA,dA,mB,dB,mC,dp,ds) \
|
||||
PUSH_3(X, DATAp, ds, ds, 0, o, (p), s, X##mC, (dp), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_1P(X,o,p,s,mA,dp,ds) \
|
||||
PUSH_1(X, DATAp, ds, 0, o, (p), s, X##mA, (dp))
|
||||
#define PUSH_2P(X,o,p,s,mA,dA,mB,dp,ds) \
|
||||
PUSH_2(X, DATAp, ds, 0, o, (p), s, X##mB, (dp), \
|
||||
X##mA, (dA))
|
||||
#define PUSH_3P(X,o,p,s,mA,dA,mB,dB,mC,dp,ds) \
|
||||
PUSH_3(X, DATAp, ds, 0, o, (p), s, X##mC, (dp), \
|
||||
X##mB, (dB), \
|
||||
X##mA, (dA))
|
||||
|
||||
#define PUSH_(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,IMPL,...) IMPL
|
||||
#define PUSH(A...) PUSH_(A, PUSH_10P, PUSH_10D, \
|
||||
|
@ -315,6 +315,10 @@ nouveau_svmm_init(struct drm_device *dev, void *data,
|
||||
struct drm_nouveau_svm_init *args = data;
|
||||
int ret;
|
||||
|
||||
/* We need to fail if svm is disabled */
|
||||
if (!cli->drm->svm)
|
||||
return -ENOSYS;
|
||||
|
||||
/* Allocate tracking for SVM-enabled VMM. */
|
||||
if (!(svmm = kzalloc(sizeof(*svmm), GFP_KERNEL)))
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user