Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5e5dedd authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge remote branch 'nouveau/for-airlied' into drm-linus

* nouveau/for-airlied:
  drm/nouveau: add module option to disable TV detection
  drm/nouveau: Never evict VRAM buffers to system.
  drm/nv50: fix connector table parsing for some cards
  drm/nv50: add a memory barrier to pushbuf submission
  drm/nouveau: print a message very early during suspend
  drm/nv04-nv40: Fix up the programmed horizontal sync pulse delay.
  drm/nouveau: Gigabyte NX85T connector table lies, it has DVI-I not HDMI
  drm/nouveau: add option to allow override of dcb connector table types
  drm/nv50: Improve PGRAPH interrupt handling.
  drm/nv50: Make ctxprog wait until interrupt handler is done.
  drm/nouveau: Fix fbcon corruption with font width not divisible by 8
  drm/nv50: Remove redundant/incorrect ctxvals initialisation.
parents 44fef224 f4053509
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \
             nouveau_dp.o nouveau_grctx.o \
             nv04_timer.o \
             nv04_mc.o nv40_mc.o nv50_mc.o \
             nv04_fb.o nv10_fb.o nv40_fb.o \
             nv04_fb.o nv10_fb.o nv40_fb.o nv50_fb.o \
             nv04_fifo.o nv10_fifo.o nv40_fifo.o nv50_fifo.o \
             nv04_graph.o nv10_graph.o nv20_graph.o \
             nv40_graph.o nv50_graph.o \
+26 −2
Original line number Diff line number Diff line
@@ -5210,6 +5210,21 @@ divine_connector_type(struct nvbios *bios, int index)
	return type;
}

static void
apply_dcb_connector_quirks(struct nvbios *bios, int idx)
{
	struct dcb_connector_table_entry *cte = &bios->dcb.connector.entry[idx];
	struct drm_device *dev = bios->dev;

	/* Gigabyte NX85T */
	if ((dev->pdev->device == 0x0421) &&
	    (dev->pdev->subsystem_vendor == 0x1458) &&
	    (dev->pdev->subsystem_device == 0x344c)) {
		if (cte->type == DCB_CONNECTOR_HDMI_1)
			cte->type = DCB_CONNECTOR_DVI_I;
	}
}

static void
parse_dcb_connector_table(struct nvbios *bios)
{
@@ -5238,13 +5253,14 @@ parse_dcb_connector_table(struct nvbios *bios)
	entry = conntab + conntab[1];
	cte = &ct->entry[0];
	for (i = 0; i < conntab[2]; i++, entry += conntab[3], cte++) {
		cte->index = i;
		if (conntab[3] == 2)
			cte->entry = ROM16(entry[0]);
		else
			cte->entry = ROM32(entry[0]);

		cte->type  = (cte->entry & 0x000000ff) >> 0;
		cte->index = (cte->entry & 0x00000f00) >> 8;
		cte->index2 = (cte->entry & 0x00000f00) >> 8;
		switch (cte->entry & 0x00033000) {
		case 0x00001000:
			cte->gpio_tag = 0x07;
@@ -5266,6 +5282,8 @@ parse_dcb_connector_table(struct nvbios *bios)
		if (cte->type == 0xff)
			continue;

		apply_dcb_connector_quirks(bios, i);

		NV_INFO(dev, "  %d: 0x%08x: type 0x%02x idx %d tag 0x%02x\n",
			i, cte->entry, cte->type, cte->index, cte->gpio_tag);

@@ -5287,10 +5305,16 @@ parse_dcb_connector_table(struct nvbios *bios)
			break;
		default:
			cte->type = divine_connector_type(bios, cte->index);
			NV_WARN(dev, "unknown type, using 0x%02x", cte->type);
			NV_WARN(dev, "unknown type, using 0x%02x\n", cte->type);
			break;
		}

		if (nouveau_override_conntype) {
			int type = divine_connector_type(bios, cte->index);
			if (type != cte->type)
				NV_WARN(dev, " -> type 0x%02x\n", cte->type);
		}

	}
}

+2 −1
Original line number Diff line number Diff line
@@ -72,9 +72,10 @@ enum dcb_connector_type {
};

struct dcb_connector_table_entry {
	uint8_t index;
	uint32_t entry;
	enum dcb_connector_type type;
	uint8_t index;
	uint8_t index2;
	uint8_t gpio_tag;
};

+1 −2
Original line number Diff line number Diff line
@@ -439,8 +439,7 @@ nouveau_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *pl)

	switch (bo->mem.mem_type) {
	case TTM_PL_VRAM:
		nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT |
					 TTM_PL_FLAG_SYSTEM);
		nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT);
		break;
	default:
		nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_SYSTEM);
+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ nouveau_connector_detect(struct drm_connector *connector)

detect_analog:
	nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG);
	if (!nv_encoder)
	if (!nv_encoder && !nouveau_tv_disable)
		nv_encoder = find_encoder_by_type(connector, OUTPUT_TV);
	if (nv_encoder) {
		struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
Loading