Commit 3f7dc91a authored by Dave Airlie's avatar Dave Airlie

drm/rs600/690: use autogenerated safe register tables.

This ports rs690 to the safe reg tables and makes rs600 also
use the same table.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 52f97df5
...@@ -17,10 +17,15 @@ $(obj)/rv515_reg_safe.h: $(src)/reg_srcs/rv515 $(obj)/mkregtable ...@@ -17,10 +17,15 @@ $(obj)/rv515_reg_safe.h: $(src)/reg_srcs/rv515 $(obj)/mkregtable
$(obj)/r300_reg_safe.h: $(src)/reg_srcs/r300 $(obj)/mkregtable $(obj)/r300_reg_safe.h: $(src)/reg_srcs/r300 $(obj)/mkregtable
$(call if_changed,mkregtable) $(call if_changed,mkregtable)
$(obj)/rs600_reg_safe.h: $(src)/reg_srcs/rs600 $(obj)/mkregtable
$(call if_changed,mkregtable)
$(obj)/rv515.o: $(obj)/rv515_reg_safe.h $(obj)/rv515.o: $(obj)/rv515_reg_safe.h
$(obj)/r300.o: $(obj)/r300_reg_safe.h $(obj)/r300.o: $(obj)/r300_reg_safe.h
$(obj)/rs600.o: $(obj)/rs600_reg_safe.h
radeon-$(CONFIG_DRM_RADEON_KMS) += radeon_device.o radeon_kms.o \ radeon-$(CONFIG_DRM_RADEON_KMS) += radeon_device.o radeon_kms.o \
radeon_atombios.o radeon_agp.o atombios_crtc.o radeon_combios.o \ radeon_atombios.o radeon_agp.o atombios_crtc.o radeon_combios.o \
atom.o radeon_fence.o radeon_ttm.o radeon_object.o radeon_gart.o \ atom.o radeon_fence.o radeon_ttm.o radeon_object.o radeon_gart.o \
......
...@@ -266,6 +266,7 @@ static struct radeon_asic rs400_asic = { ...@@ -266,6 +266,7 @@ static struct radeon_asic rs400_asic = {
/* /*
* rs600. * rs600.
*/ */
int rs600_init(struct radeon_device *rdev);
void rs600_errata(struct radeon_device *rdev); void rs600_errata(struct radeon_device *rdev);
void rs600_vram_info(struct radeon_device *rdev); void rs600_vram_info(struct radeon_device *rdev);
int rs600_mc_init(struct radeon_device *rdev); int rs600_mc_init(struct radeon_device *rdev);
...@@ -281,7 +282,7 @@ uint32_t rs600_mc_rreg(struct radeon_device *rdev, uint32_t reg); ...@@ -281,7 +282,7 @@ uint32_t rs600_mc_rreg(struct radeon_device *rdev, uint32_t reg);
void rs600_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); void rs600_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
void rs600_bandwidth_update(struct radeon_device *rdev); void rs600_bandwidth_update(struct radeon_device *rdev);
static struct radeon_asic rs600_asic = { static struct radeon_asic rs600_asic = {
.init = &r300_init, .init = &rs600_init,
.errata = &rs600_errata, .errata = &rs600_errata,
.vram_info = &rs600_vram_info, .vram_info = &rs600_vram_info,
.gpu_reset = &r300_gpu_reset, .gpu_reset = &r300_gpu_reset,
...@@ -316,7 +317,6 @@ static struct radeon_asic rs600_asic = { ...@@ -316,7 +317,6 @@ static struct radeon_asic rs600_asic = {
/* /*
* rs690,rs740 * rs690,rs740
*/ */
int rs690_init(struct radeon_device *rdev);
void rs690_errata(struct radeon_device *rdev); void rs690_errata(struct radeon_device *rdev);
void rs690_vram_info(struct radeon_device *rdev); void rs690_vram_info(struct radeon_device *rdev);
int rs690_mc_init(struct radeon_device *rdev); int rs690_mc_init(struct radeon_device *rdev);
...@@ -325,7 +325,7 @@ uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); ...@@ -325,7 +325,7 @@ uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg);
void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
void rs690_bandwidth_update(struct radeon_device *rdev); void rs690_bandwidth_update(struct radeon_device *rdev);
static struct radeon_asic rs690_asic = { static struct radeon_asic rs690_asic = {
.init = &rs690_init, .init = &rs600_init,
.errata = &rs690_errata, .errata = &rs690_errata,
.vram_info = &rs690_vram_info, .vram_info = &rs690_vram_info,
.gpu_reset = &r300_gpu_reset, .gpu_reset = &r300_gpu_reset,
......
This diff is collapsed.
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "radeon_reg.h" #include "radeon_reg.h"
#include "radeon.h" #include "radeon.h"
#include "rs600_reg_safe.h"
/* rs600 depends on : */ /* rs600 depends on : */
void r100_hdp_reset(struct radeon_device *rdev); void r100_hdp_reset(struct radeon_device *rdev);
int r100_gui_wait_for_idle(struct radeon_device *rdev); int r100_gui_wait_for_idle(struct radeon_device *rdev);
...@@ -409,3 +411,10 @@ void rs600_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) ...@@ -409,3 +411,10 @@ void rs600_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
((reg) & RS600_MC_ADDR_MASK)); ((reg) & RS600_MC_ADDR_MASK));
WREG32(RS600_MC_DATA, v); WREG32(RS600_MC_DATA, v);
} }
int rs600_init(struct radeon_device *rdev)
{
rdev->config.r300.reg_safe_bm = rs600_reg_safe_bm;
rdev->config.r300.reg_safe_bm_size = ARRAY_SIZE(rs600_reg_safe_bm);
return 0;
}
...@@ -652,68 +652,3 @@ void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) ...@@ -652,68 +652,3 @@ void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
WREG32(RS690_MC_DATA, v); WREG32(RS690_MC_DATA, v);
WREG32(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK); WREG32(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK);
} }
static const unsigned rs690_reg_safe_bm[219] = {
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
0xFFFFFFFF,0xFFFFFFFF,0x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F,0xFFFFFFFF,0xFFFFFFFF,
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
};
int rs690_init(struct radeon_device *rdev)
{
rdev->config.r300.reg_safe_bm = rs690_reg_safe_bm;
rdev->config.r300.reg_safe_bm_size = ARRAY_SIZE(rs690_reg_safe_bm);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment