Commit c689b069 authored by Dave Airlie's avatar Dave Airlie

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: default avatarDave Airlie <airlied@redhat.com>
From: Ben Skeggs <skeggsb@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ <CACAvsv51mZaRuT5R=VhbKSTPzd15L4FbDiPQ+wsF+C23c_fOAQ@mail.gmail.com
parents a04616a3 ee864216
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
config DRM_NOUVEAU config DRM_NOUVEAU
tristate "Nouveau (NVIDIA) cards" tristate "Nouveau (NVIDIA) cards"
depends on DRM && PCI && MMU depends on DRM && PCI && MMU
select IOMMU_API
select FW_LOADER select FW_LOADER
select DRM_KMS_HELPER select DRM_KMS_HELPER
select DRM_TTM select DRM_TTM
......
...@@ -53,7 +53,7 @@ struct nv_sim_state { ...@@ -53,7 +53,7 @@ struct nv_sim_state {
static void static void
nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb)
{ {
int pagemiss, cas, width, bpp; int pagemiss, cas, bpp;
int nvclks, mclks, crtpagemiss; int nvclks, mclks, crtpagemiss;
int found, mclk_extra, mclk_loop, cbs, m1, p1; int found, mclk_extra, mclk_loop, cbs, m1, p1;
int mclk_freq, pclk_freq, nvclk_freq; int mclk_freq, pclk_freq, nvclk_freq;
...@@ -65,7 +65,6 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) ...@@ -65,7 +65,6 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb)
nvclk_freq = arb->nvclk_khz; nvclk_freq = arb->nvclk_khz;
pagemiss = arb->mem_page_miss; pagemiss = arb->mem_page_miss;
cas = arb->mem_latency; cas = arb->mem_latency;
width = arb->memory_width >> 6;
bpp = arb->bpp; bpp = arb->bpp;
cbs = 128; cbs = 128;
......
...@@ -1669,7 +1669,6 @@ nv50_pior_enable(struct drm_encoder *encoder) ...@@ -1669,7 +1669,6 @@ nv50_pior_enable(struct drm_encoder *encoder)
{ {
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc); struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
struct nouveau_connector *nv_connector;
struct nv50_head_atom *asyh = nv50_head_atom(nv_crtc->base.state); struct nv50_head_atom *asyh = nv50_head_atom(nv_crtc->base.state);
struct nv50_core *core = nv50_disp(encoder->dev)->core; struct nv50_core *core = nv50_disp(encoder->dev)->core;
u8 owner = 1 << nv_crtc->index; u8 owner = 1 << nv_crtc->index;
...@@ -1677,7 +1676,6 @@ nv50_pior_enable(struct drm_encoder *encoder) ...@@ -1677,7 +1676,6 @@ nv50_pior_enable(struct drm_encoder *encoder)
nv50_outp_acquire(nv_encoder); nv50_outp_acquire(nv_encoder);
nv_connector = nouveau_encoder_connector_get(nv_encoder);
switch (asyh->or.bpc) { switch (asyh->or.bpc) {
case 10: asyh->or.depth = 0x6; break; case 10: asyh->or.depth = 0x6; break;
case 8: asyh->or.depth = 0x5; break; case 8: asyh->or.depth = 0x5; break;
......
...@@ -91,8 +91,8 @@ nvkm_memory_tags_get(struct nvkm_memory *memory, struct nvkm_device *device, ...@@ -91,8 +91,8 @@ nvkm_memory_tags_get(struct nvkm_memory *memory, struct nvkm_device *device,
} }
refcount_set(&tags->refcount, 1); refcount_set(&tags->refcount, 1);
*ptags = memory->tags = tags;
mutex_unlock(&fb->subdev.mutex); mutex_unlock(&fb->subdev.mutex);
*ptags = tags;
return 0; return 0;
} }
......
...@@ -238,6 +238,7 @@ void gp100_gr_init_fecs_exceptions(struct gf100_gr *); ...@@ -238,6 +238,7 @@ void gp100_gr_init_fecs_exceptions(struct gf100_gr *);
void gp100_gr_init_shader_exceptions(struct gf100_gr *, int, int); void gp100_gr_init_shader_exceptions(struct gf100_gr *, int, int);
void gp100_gr_zbc_clear_color(struct gf100_gr *, int); void gp100_gr_zbc_clear_color(struct gf100_gr *, int);
void gp100_gr_zbc_clear_depth(struct gf100_gr *, int); void gp100_gr_zbc_clear_depth(struct gf100_gr *, int);
extern const struct gf100_gr_func_zbc gp100_gr_zbc;
void gp102_gr_init_swdx_pes_mask(struct gf100_gr *); void gp102_gr_init_swdx_pes_mask(struct gf100_gr *);
extern const struct gf100_gr_func_zbc gp102_gr_zbc; extern const struct gf100_gr_func_zbc gp102_gr_zbc;
......
...@@ -62,7 +62,7 @@ gp100_gr_zbc_clear_depth(struct gf100_gr *gr, int zbc) ...@@ -62,7 +62,7 @@ gp100_gr_zbc_clear_depth(struct gf100_gr *gr, int zbc)
gr->zbc_depth[zbc].format << ((znum % 4) * 7)); gr->zbc_depth[zbc].format << ((znum % 4) * 7));
} }
static const struct gf100_gr_func_zbc const struct gf100_gr_func_zbc
gp100_gr_zbc = { gp100_gr_zbc = {
.clear_color = gp100_gr_zbc_clear_color, .clear_color = gp100_gr_zbc_clear_color,
.clear_depth = gp100_gr_zbc_clear_depth, .clear_depth = gp100_gr_zbc_clear_depth,
......
...@@ -60,8 +60,8 @@ gp10b_gr = { ...@@ -60,8 +60,8 @@ gp10b_gr = {
.gpc_nr = 1, .gpc_nr = 1,
.tpc_nr = 2, .tpc_nr = 2,
.ppc_nr = 1, .ppc_nr = 1,
.grctx = &gp102_grctx, .grctx = &gp100_grctx,
.zbc = &gp102_gr_zbc, .zbc = &gp100_gr_zbc,
.sclass = { .sclass = {
{ -1, -1, FERMI_TWOD_A }, { -1, -1, FERMI_TWOD_A },
{ -1, -1, KEPLER_INLINE_TO_MEMORY_B }, { -1, -1, KEPLER_INLINE_TO_MEMORY_B },
......
...@@ -52,8 +52,13 @@ gm20b_pmu_acr_bootstrap_falcon(struct nvkm_falcon *falcon, ...@@ -52,8 +52,13 @@ gm20b_pmu_acr_bootstrap_falcon(struct nvkm_falcon *falcon,
ret = nvkm_falcon_cmdq_send(pmu->hpq, &cmd.cmd.hdr, ret = nvkm_falcon_cmdq_send(pmu->hpq, &cmd.cmd.hdr,
gm20b_pmu_acr_bootstrap_falcon_cb, gm20b_pmu_acr_bootstrap_falcon_cb,
&pmu->subdev, msecs_to_jiffies(1000)); &pmu->subdev, msecs_to_jiffies(1000));
if (ret >= 0 && ret != cmd.falcon_id) if (ret >= 0) {
ret = -EIO; if (ret != cmd.falcon_id)
ret = -EIO;
else
ret = 0;
}
return ret; return ret;
} }
......
...@@ -52,8 +52,13 @@ gp10b_pmu_acr_bootstrap_multiple_falcons(struct nvkm_falcon *falcon, u32 mask) ...@@ -52,8 +52,13 @@ gp10b_pmu_acr_bootstrap_multiple_falcons(struct nvkm_falcon *falcon, u32 mask)
ret = nvkm_falcon_cmdq_send(pmu->hpq, &cmd.cmd.hdr, ret = nvkm_falcon_cmdq_send(pmu->hpq, &cmd.cmd.hdr,
gp10b_pmu_acr_bootstrap_multiple_falcons_cb, gp10b_pmu_acr_bootstrap_multiple_falcons_cb,
&pmu->subdev, msecs_to_jiffies(1000)); &pmu->subdev, msecs_to_jiffies(1000));
if (ret >= 0 && ret != cmd.falcon_mask) if (ret >= 0) {
ret = -EIO; if (ret != cmd.falcon_mask)
ret = -EIO;
else
ret = 0;
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment