Commit f7b2ece3 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/disp/nv50-: fetch mask of available heads during oneinit



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 3b9ba66a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ g84_disp = {
	.uevent = &nv50_disp_chan_uevent,
	.super = nv50_disp_super,
	.root = &g84_disp_root_oclass,
	.head.new = nv50_head_new,
	.head = { .cnt = nv50_head_cnt, .new = nv50_head_new },
	.dac = { .nr = 3, .new = nv50_dac_new },
	.sor = { .nr = 2, .new = g84_sor_new },
	.pior = { .nr = 3, .new = nv50_pior_new },
@@ -41,5 +41,5 @@ g84_disp = {
int
g84_disp_new(struct nvkm_device *device, int index, struct nvkm_disp **pdisp)
{
	return nv50_disp_new_(&g84_disp, device, index, 2, pdisp);
	return nv50_disp_new_(&g84_disp, device, index, pdisp);
}
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ g94_disp = {
	.uevent = &nv50_disp_chan_uevent,
	.super = nv50_disp_super,
	.root = &g94_disp_root_oclass,
	.head.new = nv50_head_new,
	.head = { .cnt = nv50_head_cnt, .new = nv50_head_new },
	.dac = { .nr = 3, .new = nv50_dac_new },
	.sor = { .nr = 4, .new = g94_sor_new },
	.pior = { .nr = 3, .new = nv50_pior_new },
@@ -41,5 +41,5 @@ g94_disp = {
int
g94_disp_new(struct nvkm_device *device, int index, struct nvkm_disp **pdisp)
{
	return nv50_disp_new_(&g94_disp, device, index, 2, pdisp);
	return nv50_disp_new_(&g94_disp, device, index, pdisp);
}
+2 −10
Original line number Diff line number Diff line
@@ -164,14 +164,6 @@ gf119_disp_intr(struct nv50_disp *disp)
	}
}

int
gf119_disp_new_(const struct nv50_disp_func *func, struct nvkm_device *device,
		int index, struct nvkm_disp **pdisp)
{
	u32 heads = nvkm_rd32(device, 0x022448);
	return nv50_disp_new_(func, device, index, heads, pdisp);
}

static const struct nv50_disp_func
gf119_disp = {
	.intr = gf119_disp_intr,
@@ -179,7 +171,7 @@ gf119_disp = {
	.uevent = &gf119_disp_chan_uevent,
	.super = gf119_disp_super,
	.root = &gf119_disp_root_oclass,
	.head.new = gf119_head_new,
	.head = { .cnt = gf119_head_cnt, .new = gf119_head_new },
	.dac = { .nr = 3, .new = gf119_dac_new },
	.sor = { .nr = 4, .new = gf119_sor_new },
};
@@ -187,5 +179,5 @@ gf119_disp = {
int
gf119_disp_new(struct nvkm_device *device, int index, struct nvkm_disp **pdisp)
{
	return gf119_disp_new_(&gf119_disp, device, index, pdisp);
	return nv50_disp_new_(&gf119_disp, device, index, pdisp);
}
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ gk104_disp = {
	.uevent = &gf119_disp_chan_uevent,
	.super = gf119_disp_super,
	.root = &gk104_disp_root_oclass,
	.head.new = gf119_head_new,
	.head = { .cnt = gf119_head_cnt, .new = gf119_head_new },
	.dac = { .nr = 3, .new = gf119_dac_new },
	.sor = { .nr = 4, .new = gk104_sor_new },
};
@@ -41,5 +41,5 @@ gk104_disp = {
int
gk104_disp_new(struct nvkm_device *device, int index, struct nvkm_disp **pdisp)
{
	return gf119_disp_new_(&gk104_disp, device, index, pdisp);
	return nv50_disp_new_(&gk104_disp, device, index, pdisp);
}
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ gk110_disp = {
	.uevent = &gf119_disp_chan_uevent,
	.super = gf119_disp_super,
	.root = &gk110_disp_root_oclass,
	.head.new = gf119_head_new,
	.head = { .cnt = gf119_head_cnt, .new = gf119_head_new },
	.dac = { .nr = 3, .new = gf119_dac_new },
	.sor = { .nr = 4, .new = gk104_sor_new },
};
@@ -41,5 +41,5 @@ gk110_disp = {
int
gk110_disp_new(struct nvkm_device *device, int index, struct nvkm_disp **pdisp)
{
	return gf119_disp_new_(&gk110_disp, device, index, pdisp);
	return nv50_disp_new_(&gk110_disp, device, index, pdisp);
}
Loading