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

Commit ed24fee2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm radeon/nouveau/core fixes from Dave Airlie:
 "Mostly radeon fixes, with some nouveau bios parser, ttm fix and a fix
  for AST driver"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (42 commits)
  drm/fb-helper: don't sleep for screen unblank when an oops is in progress
  drm, ttm Fix uninitialized warning
  drm/ttm: fix the tt_populated check in ttm_tt_destroy()
  drm/nouveau/ttm: prevent double-free in nouveau_sgdma_create_ttm() failure path
  drm/nouveau/bios/init: fix thinko in INIT_CONFIGURE_MEM
  drm/nouveau/kms: enable for non-vga pci classes
  drm/nouveau/bios/init: stub opcode 0xaa
  drm/radeon: avoid UVD corruptions on AGP cards
  drm/radeon: fix panel scaling with eDP and LVDS bridges
  drm/radeon/dpm: rework auto performance level enable
  drm/radeon: Fix hmdi typo
  drm/radeon/dpm/rs780: fix force_performance state for same sclks
  drm/radeon/dpm/rs780: don't enable sclk scaling if not required
  drm/radeon/dpm/rs780: add some sanity checking to sclk scaling
  drm/radeon/dpm/rs780: use drm_mode_vrefresh()
  drm/udl: rip out set_need_resched
  drm/ast: fix the ast open key function
  drm/radeon/dpm: add bapm callback for kb/kv
  drm/radeon/dpm: add bapm callback for trinity
  drm/radeon/dpm: add infrastructure to properly handle bapm
  ...
parents 3fe03deb 928c2f0c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -177,7 +177,7 @@ uint8_t ast_get_index_reg_mask(struct ast_private *ast,


static inline void ast_open_key(struct ast_private *ast)
static inline void ast_open_key(struct ast_private *ast)
{
{
	ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xA1, 0xFF, 0x04);
	ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x80, 0xA8);
}
}


#define AST_VIDMEM_SIZE_8M    0x00800000
#define AST_VIDMEM_SIZE_8M    0x00800000
+8 −0
Original line number Original line Diff line number Diff line
@@ -407,6 +407,14 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode)
	struct drm_connector *connector;
	struct drm_connector *connector;
	int i, j;
	int i, j;


	/*
	 * fbdev->blank can be called from irq context in case of a panic.
	 * Since we already have our own special panic handler which will
	 * restore the fbdev console mode completely, just bail out early.
	 */
	if (oops_in_progress)
		return;

	/*
	/*
	 * fbdev->blank can be called from irq context in case of a panic.
	 * fbdev->blank can be called from irq context in case of a panic.
	 * Since we already have our own special panic handler which will
	 * Since we already have our own special panic handler which will
+18 −3
Original line number Original line Diff line number Diff line
@@ -579,8 +579,22 @@ static void
init_reserved(struct nvbios_init *init)
init_reserved(struct nvbios_init *init)
{
{
	u8 opcode = nv_ro08(init->bios, init->offset);
	u8 opcode = nv_ro08(init->bios, init->offset);
	trace("RESERVED\t0x%02x\n", opcode);
	u8 length, i;
	init->offset += 1;

	switch (opcode) {
	case 0xaa:
		length = 4;
		break;
	default:
		length = 1;
		break;
	}

	trace("RESERVED 0x%02x\t", opcode);
	for (i = 1; i < length; i++)
		cont(" 0x%02x", nv_ro08(init->bios, init->offset + i));
	cont("\n");
	init->offset += length;
}
}


/**
/**
@@ -1437,7 +1451,7 @@ init_configure_mem(struct nvbios_init *init)
	data = init_rdvgai(init, 0x03c4, 0x01);
	data = init_rdvgai(init, 0x03c4, 0x01);
	init_wrvgai(init, 0x03c4, 0x01, data | 0x20);
	init_wrvgai(init, 0x03c4, 0x01, data | 0x20);


	while ((addr = nv_ro32(bios, sdata)) != 0xffffffff) {
	for (; (addr = nv_ro32(bios, sdata)) != 0xffffffff; sdata += 4) {
		switch (addr) {
		switch (addr) {
		case 0x10021c: /* CKE_NORMAL */
		case 0x10021c: /* CKE_NORMAL */
		case 0x1002d0: /* CMD_REFRESH */
		case 0x1002d0: /* CMD_REFRESH */
@@ -2135,6 +2149,7 @@ static struct nvbios_init_opcode {
	[0x99] = { init_zm_auxch },
	[0x99] = { init_zm_auxch },
	[0x9a] = { init_i2c_long_if },
	[0x9a] = { init_i2c_long_if },
	[0xa9] = { init_gpio_ne },
	[0xa9] = { init_gpio_ne },
	[0xaa] = { init_reserved },
};
};


#define init_opcode_nr (sizeof(init_opcode) / sizeof(init_opcode[0]))
#define init_opcode_nr (sizeof(init_opcode) / sizeof(init_opcode[0]))
+15 −20
Original line number Original line Diff line number Diff line
@@ -278,7 +278,6 @@ nouveau_display_create(struct drm_device *dev)
{
{
	struct nouveau_drm *drm = nouveau_drm(dev);
	struct nouveau_drm *drm = nouveau_drm(dev);
	struct nouveau_display *disp;
	struct nouveau_display *disp;
	u32 pclass = dev->pdev->class >> 8;
	int ret, gen;
	int ret, gen;


	disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL);
	disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL);
@@ -340,8 +339,6 @@ nouveau_display_create(struct drm_device *dev)
	drm_kms_helper_poll_init(dev);
	drm_kms_helper_poll_init(dev);
	drm_kms_helper_poll_disable(dev);
	drm_kms_helper_poll_disable(dev);


	if (nouveau_modeset == 1 ||
	    (nouveau_modeset < 0 && pclass == PCI_CLASS_DISPLAY_VGA)) {
	if (drm->vbios.dcb.entries) {
	if (drm->vbios.dcb.entries) {
		if (nv_device(drm->device)->card_type < NV_50)
		if (nv_device(drm->device)->card_type < NV_50)
			ret = nv04_display_create(dev);
			ret = nv04_display_create(dev);
@@ -361,8 +358,6 @@ nouveau_display_create(struct drm_device *dev)
	}
	}


	nouveau_backlight_init(dev);
	nouveau_backlight_init(dev);
	}

	return 0;
	return 0;


vblank_err:
vblank_err:
+2 −1
Original line number Original line Diff line number Diff line
@@ -454,7 +454,8 @@ nouveau_fbcon_init(struct drm_device *dev)
	int preferred_bpp;
	int preferred_bpp;
	int ret;
	int ret;


	if (!dev->mode_config.num_crtc)
	if (!dev->mode_config.num_crtc ||
	    (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
		return 0;
		return 0;


	fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL);
	fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL);
Loading