Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298513
b: refs/heads/master
c: 402976f
h: refs/heads/master
i:
  298511: 5828125
v: v3
  • Loading branch information
Alex Deucher authored and Dave Airlie committed Apr 2, 2012
1 parent 7475a7c commit d9b1d28
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d06221c0617ab6d0bc41c4980cefdd9c8cc9a1c1
refs/heads/master: 402976fe51b2d1a58a29ba06fa1ca5ace3a4cdcd
15 changes: 14 additions & 1 deletion trunk/drivers/gpu/drm/radeon/atom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +1306,11 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)

int atom_asic_init(struct atom_context *ctx)
{
struct radeon_device *rdev = ctx->card->dev->dev_private;
int hwi = CU16(ctx->data_table + ATOM_DATA_FWI_PTR);
uint32_t ps[16];
int ret;

memset(ps, 0, 64);

ps[0] = cpu_to_le32(CU32(hwi + ATOM_FWI_DEFSCLK_PTR));
Expand All @@ -1317,7 +1320,17 @@ int atom_asic_init(struct atom_context *ctx)

if (!CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_INIT))
return 1;
return atom_execute_table(ctx, ATOM_CMD_INIT, ps);
ret = atom_execute_table(ctx, ATOM_CMD_INIT, ps);
if (ret)
return ret;

memset(ps, 0, 64);

if (rdev->family < CHIP_R600) {
if (CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_SPDFANCNTL))
atom_execute_table(ctx, ATOM_CMD_SPDFANCNTL, ps);
}
return ret;
}

void atom_destroy(struct atom_context *ctx)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/radeon/atom.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#define ATOM_CMD_SETSCLK 0x0A
#define ATOM_CMD_SETMCLK 0x0B
#define ATOM_CMD_SETPCLK 0x0C
#define ATOM_CMD_SPDFANCNTL 0x39

#define ATOM_DATA_FWI_PTR 0xC
#define ATOM_DATA_IIO_PTR 0x32
Expand Down

0 comments on commit d9b1d28

Please sign in to comment.