Deleted Added
full compact
radeon_cp.c (190595) radeon_cp.c (190674)
1/*-
2 * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
3 * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
4 * Copyright 2007 Advanced Micro Devices, Inc.
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),

--- 15 unchanged lines hidden (view full) ---

24 * DEALINGS IN THE SOFTWARE.
25 *
26 * Authors:
27 * Kevin E. Martin <martin@valinux.com>
28 * Gareth Hughes <gareth@valinux.com>
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
3 * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
4 * Copyright 2007 Advanced Micro Devices, Inc.
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),

--- 15 unchanged lines hidden (view full) ---

24 * DEALINGS IN THE SOFTWARE.
25 *
26 * Authors:
27 * Kevin E. Martin <martin@valinux.com>
28 * Gareth Hughes <gareth@valinux.com>
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/drm/radeon_cp.c 190595 2009-03-31 17:52:05Z rnoland $");
32__FBSDID("$FreeBSD: head/sys/dev/drm/radeon_cp.c 190674 2009-04-03 19:21:39Z rnoland $");
33
34#include "dev/drm/drmP.h"
35#include "dev/drm/drm.h"
36#include "dev/drm/drm_sarea.h"
37#include "dev/drm/radeon_drm.h"
38#include "dev/drm/radeon_drv.h"
39#include "dev/drm/r300_reg.h"
40

--- 414 unchanged lines hidden (view full) ---

455/* Load the microcode for the CP */
456static void radeon_cp_load_microcode(drm_radeon_private_t * dev_priv)
457{
458 const u32 (*cp)[2];
459 int i;
460
461 DRM_DEBUG("\n");
462
33
34#include "dev/drm/drmP.h"
35#include "dev/drm/drm.h"
36#include "dev/drm/drm_sarea.h"
37#include "dev/drm/radeon_drm.h"
38#include "dev/drm/radeon_drv.h"
39#include "dev/drm/r300_reg.h"
40

--- 414 unchanged lines hidden (view full) ---

455/* Load the microcode for the CP */
456static void radeon_cp_load_microcode(drm_radeon_private_t * dev_priv)
457{
458 const u32 (*cp)[2];
459 int i;
460
461 DRM_DEBUG("\n");
462
463 radeon_do_wait_for_idle(dev_priv);
464
465 RADEON_WRITE(RADEON_CP_ME_RAM_ADDR, 0);
466 switch (dev_priv->flags & RADEON_FAMILY_MASK) {
467 case CHIP_R100:
468 case CHIP_RV100:
469 case CHIP_RV200:
470 case CHIP_RS100:
471 case CHIP_RS200:
472 DRM_INFO("Loading R100 Microcode\n");
473 cp = R100_cp_microcode;

--- 37 unchanged lines hidden (view full) ---

511 case CHIP_RV570:
512 DRM_INFO("Loading R500 Microcode\n");
513 cp = R520_cp_microcode;
514 break;
515 default:
516 return;
517 }
518
463 switch (dev_priv->flags & RADEON_FAMILY_MASK) {
464 case CHIP_R100:
465 case CHIP_RV100:
466 case CHIP_RV200:
467 case CHIP_RS100:
468 case CHIP_RS200:
469 DRM_INFO("Loading R100 Microcode\n");
470 cp = R100_cp_microcode;

--- 37 unchanged lines hidden (view full) ---

508 case CHIP_RV570:
509 DRM_INFO("Loading R500 Microcode\n");
510 cp = R520_cp_microcode;
511 break;
512 default:
513 return;
514 }
515
516 radeon_do_wait_for_idle(dev_priv);
517
518 RADEON_WRITE(RADEON_CP_ME_RAM_ADDR, 0);
519
519 for (i = 0; i != 256; i++) {
520 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH, cp[i][1]);
521 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL, cp[i][0]);
522 }
523}
524
525/* Flush any pending commands to the CP. This should only be used just
526 * prior to a wait for idle, as it informs the engine that the command

--- 1624 unchanged lines hidden ---
520 for (i = 0; i != 256; i++) {
521 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH, cp[i][1]);
522 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL, cp[i][0]);
523 }
524}
525
526/* Flush any pending commands to the CP. This should only be used just
527 * prior to a wait for idle, as it informs the engine that the command

--- 1624 unchanged lines hidden ---