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

Commit 7b0a9e83 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge remote branch 'korg/drm-radeon-dp' into drm-linus

This merges the radeon KMS DisplayPort and hotplug detect support.

Tested on RV635 DP card with a Dell 2408 monitor.

Conflicts:
	drivers/gpu/drm/drm_fb_helper.c
parents 3f838fc5 d4877cf2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ radeon-y += radeon_device.o radeon_kms.o \
	radeon_cs.o radeon_bios.o radeon_benchmark.o r100.o r300.o r420.o \
	rs400.o rs600.o rs690.o rv515.o r520.o r600.o rv770.o radeon_test.o \
	r200.o radeon_legacy_tv.o r600_cs.o r600_blit.o r600_blit_shaders.o \
	r600_blit_kms.o radeon_pm.o
	r600_blit_kms.o radeon_pm.o atombios_dp.o

radeon-$(CONFIG_COMPAT) += radeon_ioc32.o

+29 −4
Original line number Diff line number Diff line
@@ -263,10 +263,10 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
	case ATOM_ARG_FB:
		idx = U8(*ptr);
		(*ptr)++;
		val = gctx->scratch[((gctx->fb_base + idx) / 4)];
		if (print)
			DEBUG("FB[0x%02X]", idx);
		printk(KERN_INFO "FB access is not implemented.\n");
		return 0;
		break;
	case ATOM_ARG_IMM:
		switch (align) {
		case ATOM_SRC_DWORD:
@@ -488,9 +488,9 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr,
	case ATOM_ARG_FB:
		idx = U8(*ptr);
		(*ptr)++;
		gctx->scratch[((gctx->fb_base + idx) / 4)] = val;
		DEBUG("FB[0x%02X]", idx);
		printk(KERN_INFO "FB access is not implemented.\n");
		return;
		break;
	case ATOM_ARG_PLL:
		idx = U8(*ptr);
		(*ptr)++;
@@ -1214,3 +1214,28 @@ void atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t * frev,
		*crev = CU8(idx + 3);
	return;
}

int atom_allocate_fb_scratch(struct atom_context *ctx)
{
	int index = GetIndexIntoMasterTable(DATA, VRAM_UsageByFirmware);
	uint16_t data_offset;
	int usage_bytes;
	struct _ATOM_VRAM_USAGE_BY_FIRMWARE *firmware_usage;

	atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset);

	firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE *)(ctx->bios + data_offset);

	DRM_DEBUG("atom firmware requested %08x %dkb\n",
		  firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware,
		  firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb);

	usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024;
	if (usage_bytes == 0)
		usage_bytes = 20 * 1024;
	/* allocate some scratch memory */
	ctx->scratch = kzalloc(usage_bytes, GFP_KERNEL);
	if (!ctx->scratch)
		return -ENOMEM;
	return 0;
}
+2 −0
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@ struct atom_context {
	uint8_t shift;
	int cs_equal, cs_above;
	int io_mode;
	uint32_t *scratch;
};

extern int atom_debug;
@@ -142,6 +143,7 @@ int atom_asic_init(struct atom_context *);
void atom_destroy(struct atom_context *);
void atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, uint8_t *frev, uint8_t *crev, uint16_t *data_start);
void atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t *frev, uint8_t *crev);
int atom_allocate_fb_scratch(struct atom_context *ctx);
#include "atom-types.h"
#include "atombios.h"
#include "ObjectID.h"
+1 −1
Original line number Diff line number Diff line
@@ -2680,7 +2680,7 @@ typedef struct _ATOM_I2C_RECORD {
typedef struct _ATOM_HPD_INT_RECORD {
	ATOM_COMMON_RECORD_HEADER sheader;
	UCHAR ucHPDIntGPIOID;	/* Corresponding block in GPIO_PIN_INFO table gives the pin info */
	UCHAR ucPluggged_PinState;
	UCHAR ucPlugged_PinState;
} ATOM_HPD_INT_RECORD;

typedef struct _ATOM_OUTPUT_PROTECTION_RECORD {
+790 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading