diff --git a/drm-nouveau-evo-hang.patch b/drm-nouveau-evo-hang.patch new file mode 100644 index 0000000..aedc9c5 --- /dev/null +++ b/drm-nouveau-evo-hang.patch @@ -0,0 +1,32 @@ +From d0301ece9e093c484f880893dc86d97848360892 Mon Sep 17 00:00:00 2001 +From: Ben Skeggs +Date: Fri, 19 Nov 2010 18:50:57 +1000 +Subject: [PATCH 2/2] drm-nouveau-evo-hang + +On some GF8+ boards, the display engine will stop processing its push +buffer if a wrap-around occurs at a certain point. The exact cause +is not known. + +This patch by David Dillow (rhbz#537065) is a safe enough work-around +until it can be solved properly. + +Signed-off-by: Ben Skeggs +--- + drivers/gpu/drm/nouveau/nv50_display.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c +index 11d366a..4e5402c 100644 +--- a/drivers/gpu/drm/nouveau/nv50_display.c ++++ b/drivers/gpu/drm/nouveau/nv50_display.c +@@ -364,6 +364,7 @@ nv50_display_init(struct drm_device *dev) + nv_wr32(dev, 0x610300, nv_rd32(dev, 0x610300) & ~1); + + evo->dma.max = (4096/4) - 2; ++ evo->dma.max &= ~7; + evo->dma.put = 0; + evo->dma.cur = evo->dma.put; + evo->dma.free = evo->dma.max - evo->dma.cur; +-- +1.7.3.2 + diff --git a/drm-nouveau-imac-g4.patch b/drm-nouveau-imac-g4.patch new file mode 100644 index 0000000..316605e --- /dev/null +++ b/drm-nouveau-imac-g4.patch @@ -0,0 +1,167 @@ +From b4166db6d1f951a460e5e7f52bb4b4d96f27f55a Mon Sep 17 00:00:00 2001 +From: Francisco Jerez +Date: Fri, 19 Nov 2010 18:08:47 +1000 +Subject: [PATCH 1/2] drm-nouveau-imac-g4 + +drm/nouveau: fabricate DCB encoder table for iMac G4 + +In typical Apple fashion there's no standard information about what +encoders are present on this machine, this patch adds a quirk to +provide it. + +Signed-off-by: Francisco Jerez +Signed-off-by: Ben Skeggs +--- + drivers/gpu/drm/nouveau/nouveau_bios.c | 102 ++++++++++++-------------------- + 1 files changed, 38 insertions(+), 64 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c +index 72905c9..8c287f8 100644 +--- a/drivers/gpu/drm/nouveau/nouveau_bios.c ++++ b/drivers/gpu/drm/nouveau/nouveau_bios.c +@@ -5985,52 +5985,17 @@ static struct dcb_entry *new_dcb_entry(struct dcb_table *dcb) + return entry; + } + +-static void fabricate_vga_output(struct dcb_table *dcb, int i2c, int heads) ++static void fabricate_dcb_output(struct dcb_table *dcb, int type, int i2c, ++ int heads, int or) + { + struct dcb_entry *entry = new_dcb_entry(dcb); + +- entry->type = 0; ++ entry->type = type; + entry->i2c_index = i2c; + entry->heads = heads; +- entry->location = DCB_LOC_ON_CHIP; +- entry->or = 1; +-} +- +-static void fabricate_dvi_i_output(struct dcb_table *dcb, bool twoHeads) +-{ +- struct dcb_entry *entry = new_dcb_entry(dcb); +- +- entry->type = 2; +- entry->i2c_index = LEGACY_I2C_PANEL; +- entry->heads = twoHeads ? 3 : 1; +- entry->location = !DCB_LOC_ON_CHIP; /* ie OFF CHIP */ +- entry->or = 1; /* means |0x10 gets set on CRE_LCD__INDEX */ +- entry->duallink_possible = false; /* SiI164 and co. are single link */ +- +-#if 0 +- /* +- * For dvi-a either crtc probably works, but my card appears to only +- * support dvi-d. "nvidia" still attempts to program it for dvi-a, +- * doing the full fp output setup (program 0x6808.. fp dimension regs, +- * setting 0x680848 to 0x10000111 to enable, maybe setting 0x680880); +- * the monitor picks up the mode res ok and lights up, but no pixel +- * data appears, so the board manufacturer probably connected up the +- * sync lines, but missed the video traces / components +- * +- * with this introduction, dvi-a left as an exercise for the reader. +- */ +- fabricate_vga_output(dcb, LEGACY_I2C_PANEL, entry->heads); +-#endif +-} +- +-static void fabricate_tv_output(struct dcb_table *dcb, bool twoHeads) +-{ +- struct dcb_entry *entry = new_dcb_entry(dcb); +- +- entry->type = 1; +- entry->i2c_index = LEGACY_I2C_TV; +- entry->heads = twoHeads ? 3 : 1; +- entry->location = !DCB_LOC_ON_CHIP; /* ie OFF CHIP */ ++ if (type != OUTPUT_ANALOG) ++ entry->location = !DCB_LOC_ON_CHIP; /* ie OFF CHIP */ ++ entry->or = or; + } + + static bool +@@ -6297,8 +6262,36 @@ apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf) + return true; + } + ++static void ++fabricate_dcb_encoder_table(struct drm_device *dev, struct nvbios *bios) ++{ ++ struct dcb_table *dcb = &bios->dcb; ++ int all_heads = (nv_two_heads(dev) ? 3 : 1); ++ ++#ifdef __powerpc__ ++ /* Apple iMac G4 NV17 */ ++ if (of_machine_is_compatible("PowerMac4,5")) { ++ fabricate_dcb_output(dcb, OUTPUT_TMDS, 0, all_heads, 1); ++ fabricate_dcb_output(dcb, OUTPUT_ANALOG, 1, all_heads, 2); ++ return; ++ } ++#endif ++ ++ /* Make up some sane defaults */ ++ fabricate_dcb_output(dcb, OUTPUT_ANALOG, LEGACY_I2C_CRT, 1, 1); ++ ++ if (nv04_tv_identify(dev, bios->legacy.i2c_indices.tv) >= 0) ++ fabricate_dcb_output(dcb, OUTPUT_TV, LEGACY_I2C_TV, ++ all_heads, 0); ++ ++ else if (bios->tmds.output0_script_ptr || ++ bios->tmds.output1_script_ptr) ++ fabricate_dcb_output(dcb, OUTPUT_TMDS, LEGACY_I2C_PANEL, ++ all_heads, 1); ++} ++ + static int +-parse_dcb_table(struct drm_device *dev, struct nvbios *bios, bool twoHeads) ++parse_dcb_table(struct drm_device *dev, struct nvbios *bios) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct dcb_table *dcb = &bios->dcb; +@@ -6318,12 +6311,7 @@ parse_dcb_table(struct drm_device *dev, struct nvbios *bios, bool twoHeads) + + /* this situation likely means a really old card, pre DCB */ + if (dcbptr == 0x0) { +- NV_INFO(dev, "Assuming a CRT output exists\n"); +- fabricate_vga_output(dcb, LEGACY_I2C_CRT, 1); +- +- if (nv04_tv_identify(dev, bios->legacy.i2c_indices.tv) >= 0) +- fabricate_tv_output(dcb, twoHeads); +- ++ fabricate_dcb_encoder_table(dev, bios); + return 0; + } + +@@ -6383,21 +6371,7 @@ parse_dcb_table(struct drm_device *dev, struct nvbios *bios, bool twoHeads) + */ + NV_TRACEWARN(dev, "No useful information in BIOS output table; " + "adding all possible outputs\n"); +- fabricate_vga_output(dcb, LEGACY_I2C_CRT, 1); +- +- /* +- * Attempt to detect TV before DVI because the test +- * for the former is more accurate and it rules the +- * latter out. +- */ +- if (nv04_tv_identify(dev, +- bios->legacy.i2c_indices.tv) >= 0) +- fabricate_tv_output(dcb, twoHeads); +- +- else if (bios->tmds.output0_script_ptr || +- bios->tmds.output1_script_ptr) +- fabricate_dvi_i_output(dcb, twoHeads); +- ++ fabricate_dcb_encoder_table(dev, bios); + return 0; + } + +@@ -6787,7 +6761,7 @@ nouveau_bios_init(struct drm_device *dev) + if (ret) + return ret; + +- ret = parse_dcb_table(dev, bios, nv_two_heads(dev)); ++ ret = parse_dcb_table(dev, bios); + if (ret) + return ret; + +-- +1.7.3.2 + diff --git a/drm-nouveau-nvaf-grclass.patch b/drm-nouveau-nvaf-grclass.patch new file mode 100644 index 0000000..87e05f4 --- /dev/null +++ b/drm-nouveau-nvaf-grclass.patch @@ -0,0 +1,25 @@ +From 7abba51e3fc9e3fdd43c63eeb1a680a2e258a833 Mon Sep 17 00:00:00 2001 +From: Ben Skeggs +Date: Fri, 19 Nov 2010 18:59:15 +1000 +Subject: [PATCH] drm-nouveau-nvaf-grclass + +Signed-off-by: Ben Skeggs +--- + drivers/gpu/drm/nouveau/nv50_graph.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c +index 8b669d0..235be5f 100644 +--- a/drivers/gpu/drm/nouveau/nv50_graph.c ++++ b/drivers/gpu/drm/nouveau/nv50_graph.c +@@ -400,6 +400,7 @@ struct nouveau_pgraph_object_class nv50_graph_grclass[] = { + { 0x8297, false, NULL }, /* tesla (nv8x/nv9x) */ + { 0x8397, false, NULL }, /* tesla (nva0, nvaa, nvac) */ + { 0x8597, false, NULL }, /* tesla (nva3, nva5, nva8) */ ++ { 0x8697, false, NULL }, /* tesla (nvaf) */ + {} + }; + +-- +1.7.3.2 + diff --git a/kernel.spec b/kernel.spec index 49d40e7..84b9b23 100644 --- a/kernel.spec +++ b/kernel.spec @@ -48,7 +48,7 @@ Summary: The Linux kernel # reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec). # scripts/rebase.sh should be made to do that for you, actually. # -%global baserelease 59 +%global baserelease 60 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -674,6 +674,9 @@ Patch1812: drm-nouveau-nva3-noaccel.patch Patch1813: drm-nouveau-nv86-bug.patch Patch1814: drm-nouveau-nv50-crtc-update-delay.patch Patch1815: drm-nouveau-connector-fix.patch +Patch1816: drm-nouveau-imac-g4.patch +Patch1817: drm-nouveau-evo-hang.patch +Patch1818: drm-nouveau-nvaf-grclass.patch Patch1819: drm-intel-big-hammer.patch # intel drm is all merged upstream Patch1824: drm-intel-next.patch @@ -1333,6 +1336,9 @@ ApplyPatch drm-nouveau-nva3-noaccel.patch ApplyPatch drm-nouveau-nv86-bug.patch ApplyPatch drm-nouveau-nv50-crtc-update-delay.patch ApplyPatch drm-nouveau-connector-fix.patch +ApplyPatch drm-nouveau-imac-g4.patch +ApplyPatch drm-nouveau-evo-hang.patch +ApplyPatch drm-nouveau-nvaf-grclass.patch ApplyPatch drm-intel-big-hammer.patch ApplyOptionalPatch drm-intel-next.patch @@ -2028,6 +2034,11 @@ fi # and build. %changelog +* Fri Nov 19 2010 Ben Skeggs 2.6.35.8-60 +- nouveau: add quirk for iMac G4 (rhbz#505161) +- nouveau: add workaround for display hang on GF8+ (rhbz#537065) +- nouveau: don't reject 3D object creation on NVAF (MBA3) + * Mon Nov 15 2010 Kyle McMartin - rhbz#651019: pull in support for MBA3.