Skip to content

Commit c689b06

Browse files
committed
Merge branch 'linux-5.6' of git://github.com/skeggsb/linux into drm-next
Just a couple of fixes to GP10x ACR support after the work, and a (fairly severe if you're running piglit a lot) memory leak fix. Signed-off-by: Dave Airlie <[email protected]> From: Ben Skeggs <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ <CACAvsv51mZaRuT5R=VhbKSTPzd15L4FbDiPQ+wsF+C23c_fOAQ@mail.gmail.com
2 parents a04616a + ee86421 commit c689b06

File tree

9 files changed

+21
-12
lines changed

9 files changed

+21
-12
lines changed

drivers/gpu/drm/nouveau/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
config DRM_NOUVEAU
33
tristate "Nouveau (NVIDIA) cards"
44
depends on DRM && PCI && MMU
5+
select IOMMU_API
56
select FW_LOADER
67
select DRM_KMS_HELPER
78
select DRM_TTM

drivers/gpu/drm/nouveau/dispnv04/arb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct nv_sim_state {
5353
static void
5454
nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb)
5555
{
56-
int pagemiss, cas, width, bpp;
56+
int pagemiss, cas, bpp;
5757
int nvclks, mclks, crtpagemiss;
5858
int found, mclk_extra, mclk_loop, cbs, m1, p1;
5959
int mclk_freq, pclk_freq, nvclk_freq;
@@ -65,7 +65,6 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb)
6565
nvclk_freq = arb->nvclk_khz;
6666
pagemiss = arb->mem_page_miss;
6767
cas = arb->mem_latency;
68-
width = arb->memory_width >> 6;
6968
bpp = arb->bpp;
7069
cbs = 128;
7170

drivers/gpu/drm/nouveau/dispnv50/disp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,15 +1669,13 @@ nv50_pior_enable(struct drm_encoder *encoder)
16691669
{
16701670
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
16711671
struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
1672-
struct nouveau_connector *nv_connector;
16731672
struct nv50_head_atom *asyh = nv50_head_atom(nv_crtc->base.state);
16741673
struct nv50_core *core = nv50_disp(encoder->dev)->core;
16751674
u8 owner = 1 << nv_crtc->index;
16761675
u8 proto;
16771676

16781677
nv50_outp_acquire(nv_encoder);
16791678

1680-
nv_connector = nouveau_encoder_connector_get(nv_encoder);
16811679
switch (asyh->or.bpc) {
16821680
case 10: asyh->or.depth = 0x6; break;
16831681
case 8: asyh->or.depth = 0x5; break;

drivers/gpu/drm/nouveau/nvkm/core/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ nvkm_memory_tags_get(struct nvkm_memory *memory, struct nvkm_device *device,
9191
}
9292

9393
refcount_set(&tags->refcount, 1);
94+
*ptags = memory->tags = tags;
9495
mutex_unlock(&fb->subdev.mutex);
95-
*ptags = tags;
9696
return 0;
9797
}
9898

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ void gp100_gr_init_fecs_exceptions(struct gf100_gr *);
238238
void gp100_gr_init_shader_exceptions(struct gf100_gr *, int, int);
239239
void gp100_gr_zbc_clear_color(struct gf100_gr *, int);
240240
void gp100_gr_zbc_clear_depth(struct gf100_gr *, int);
241+
extern const struct gf100_gr_func_zbc gp100_gr_zbc;
241242

242243
void gp102_gr_init_swdx_pes_mask(struct gf100_gr *);
243244
extern const struct gf100_gr_func_zbc gp102_gr_zbc;

drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ gp100_gr_zbc_clear_depth(struct gf100_gr *gr, int zbc)
6262
gr->zbc_depth[zbc].format << ((znum % 4) * 7));
6363
}
6464

65-
static const struct gf100_gr_func_zbc
65+
const struct gf100_gr_func_zbc
6666
gp100_gr_zbc = {
6767
.clear_color = gp100_gr_zbc_clear_color,
6868
.clear_depth = gp100_gr_zbc_clear_depth,

drivers/gpu/drm/nouveau/nvkm/engine/gr/gp10b.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ gp10b_gr = {
6060
.gpc_nr = 1,
6161
.tpc_nr = 2,
6262
.ppc_nr = 1,
63-
.grctx = &gp102_grctx,
64-
.zbc = &gp102_gr_zbc,
63+
.grctx = &gp100_grctx,
64+
.zbc = &gp100_gr_zbc,
6565
.sclass = {
6666
{ -1, -1, FERMI_TWOD_A },
6767
{ -1, -1, KEPLER_INLINE_TO_MEMORY_B },

drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,13 @@ gm20b_pmu_acr_bootstrap_falcon(struct nvkm_falcon *falcon,
5252
ret = nvkm_falcon_cmdq_send(pmu->hpq, &cmd.cmd.hdr,
5353
gm20b_pmu_acr_bootstrap_falcon_cb,
5454
&pmu->subdev, msecs_to_jiffies(1000));
55-
if (ret >= 0 && ret != cmd.falcon_id)
56-
ret = -EIO;
55+
if (ret >= 0) {
56+
if (ret != cmd.falcon_id)
57+
ret = -EIO;
58+
else
59+
ret = 0;
60+
}
61+
5762
return ret;
5863
}
5964

drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,13 @@ gp10b_pmu_acr_bootstrap_multiple_falcons(struct nvkm_falcon *falcon, u32 mask)
5252
ret = nvkm_falcon_cmdq_send(pmu->hpq, &cmd.cmd.hdr,
5353
gp10b_pmu_acr_bootstrap_multiple_falcons_cb,
5454
&pmu->subdev, msecs_to_jiffies(1000));
55-
if (ret >= 0 && ret != cmd.falcon_mask)
56-
ret = -EIO;
55+
if (ret >= 0) {
56+
if (ret != cmd.falcon_mask)
57+
ret = -EIO;
58+
else
59+
ret = 0;
60+
}
61+
5762
return ret;
5863
}
5964

0 commit comments

Comments
 (0)