Commit b35ea4ab authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms: reorganize irq callbacks

tidy up the radeon_asic struct.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König<christian.koenig@amd.com>
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 27cd7769
...@@ -1151,8 +1151,12 @@ struct radeon_asic { ...@@ -1151,8 +1151,12 @@ struct radeon_asic {
} ring[RADEON_NUM_RINGS]; } ring[RADEON_NUM_RINGS];
int (*ring_test)(struct radeon_device *rdev, struct radeon_ring *cp); int (*ring_test)(struct radeon_device *rdev, struct radeon_ring *cp);
int (*irq_set)(struct radeon_device *rdev);
int (*irq_process)(struct radeon_device *rdev); struct {
int (*set)(struct radeon_device *rdev);
int (*process)(struct radeon_device *rdev);
} irq;
u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc); u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc);
struct { struct {
...@@ -1205,6 +1209,7 @@ struct radeon_asic { ...@@ -1205,6 +1209,7 @@ struct radeon_asic {
* through ring. * through ring.
*/ */
void (*ioctl_wait_idle)(struct radeon_device *rdev, struct radeon_bo *bo); void (*ioctl_wait_idle)(struct radeon_device *rdev, struct radeon_bo *bo);
/* check if 3D engine is idle */
bool (*gui_idle)(struct radeon_device *rdev); bool (*gui_idle)(struct radeon_device *rdev);
/* power management */ /* power management */
struct { struct {
...@@ -1679,8 +1684,8 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v); ...@@ -1679,8 +1684,8 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v);
#define radeon_ring_test(rdev, cp) (rdev)->asic->ring_test((rdev), (cp)) #define radeon_ring_test(rdev, cp) (rdev)->asic->ring_test((rdev), (cp))
#define radeon_ring_ib_execute(rdev, r, ib) (rdev)->asic->ring[(r)].ib_execute((rdev), (ib)) #define radeon_ring_ib_execute(rdev, r, ib) (rdev)->asic->ring[(r)].ib_execute((rdev), (ib))
#define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)].ib_parse((rdev), (ib)) #define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)].ib_parse((rdev), (ib))
#define radeon_irq_set(rdev) (rdev)->asic->irq_set((rdev)) #define radeon_irq_set(rdev) (rdev)->asic->irq.set((rdev))
#define radeon_irq_process(rdev) (rdev)->asic->irq_process((rdev)) #define radeon_irq_process(rdev) (rdev)->asic->irq.process((rdev))
#define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->get_vblank_counter((rdev), (crtc)) #define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->get_vblank_counter((rdev), (crtc))
#define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)].emit_fence((rdev), (fence)) #define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)].emit_fence((rdev), (fence))
#define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait)) #define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait))
......
...@@ -148,8 +148,10 @@ static struct radeon_asic r100_asic = { ...@@ -148,8 +148,10 @@ static struct radeon_asic r100_asic = {
.cs_parse = &r100_cs_parse, .cs_parse = &r100_cs_parse,
} }
}, },
.irq_set = &r100_irq_set, .irq = {
.irq_process = &r100_irq_process, .set = &r100_irq_set,
.process = &r100_irq_process,
},
.get_vblank_counter = &r100_get_vblank_counter, .get_vblank_counter = &r100_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -213,8 +215,10 @@ static struct radeon_asic r200_asic = { ...@@ -213,8 +215,10 @@ static struct radeon_asic r200_asic = {
.cs_parse = &r100_cs_parse, .cs_parse = &r100_cs_parse,
} }
}, },
.irq_set = &r100_irq_set, .irq = {
.irq_process = &r100_irq_process, .set = &r100_irq_set,
.process = &r100_irq_process,
},
.get_vblank_counter = &r100_get_vblank_counter, .get_vblank_counter = &r100_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -277,8 +281,10 @@ static struct radeon_asic r300_asic = { ...@@ -277,8 +281,10 @@ static struct radeon_asic r300_asic = {
.cs_parse = &r300_cs_parse, .cs_parse = &r300_cs_parse,
} }
}, },
.irq_set = &r100_irq_set, .irq = {
.irq_process = &r100_irq_process, .set = &r100_irq_set,
.process = &r100_irq_process,
},
.get_vblank_counter = &r100_get_vblank_counter, .get_vblank_counter = &r100_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -342,8 +348,10 @@ static struct radeon_asic r300_asic_pcie = { ...@@ -342,8 +348,10 @@ static struct radeon_asic r300_asic_pcie = {
.cs_parse = &r300_cs_parse, .cs_parse = &r300_cs_parse,
} }
}, },
.irq_set = &r100_irq_set, .irq = {
.irq_process = &r100_irq_process, .set = &r100_irq_set,
.process = &r100_irq_process,
},
.get_vblank_counter = &r100_get_vblank_counter, .get_vblank_counter = &r100_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -406,8 +414,10 @@ static struct radeon_asic r420_asic = { ...@@ -406,8 +414,10 @@ static struct radeon_asic r420_asic = {
.cs_parse = &r300_cs_parse, .cs_parse = &r300_cs_parse,
} }
}, },
.irq_set = &r100_irq_set, .irq = {
.irq_process = &r100_irq_process, .set = &r100_irq_set,
.process = &r100_irq_process,
},
.get_vblank_counter = &r100_get_vblank_counter, .get_vblank_counter = &r100_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -471,8 +481,10 @@ static struct radeon_asic rs400_asic = { ...@@ -471,8 +481,10 @@ static struct radeon_asic rs400_asic = {
.cs_parse = &r300_cs_parse, .cs_parse = &r300_cs_parse,
} }
}, },
.irq_set = &r100_irq_set, .irq = {
.irq_process = &r100_irq_process, .set = &r100_irq_set,
.process = &r100_irq_process,
},
.get_vblank_counter = &r100_get_vblank_counter, .get_vblank_counter = &r100_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -536,8 +548,10 @@ static struct radeon_asic rs600_asic = { ...@@ -536,8 +548,10 @@ static struct radeon_asic rs600_asic = {
.cs_parse = &r300_cs_parse, .cs_parse = &r300_cs_parse,
} }
}, },
.irq_set = &rs600_irq_set, .irq = {
.irq_process = &rs600_irq_process, .set = &rs600_irq_set,
.process = &rs600_irq_process,
},
.get_vblank_counter = &rs600_get_vblank_counter, .get_vblank_counter = &rs600_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -601,8 +615,10 @@ static struct radeon_asic rs690_asic = { ...@@ -601,8 +615,10 @@ static struct radeon_asic rs690_asic = {
.cs_parse = &r300_cs_parse, .cs_parse = &r300_cs_parse,
} }
}, },
.irq_set = &rs600_irq_set, .irq = {
.irq_process = &rs600_irq_process, .set = &rs600_irq_set,
.process = &rs600_irq_process,
},
.get_vblank_counter = &rs600_get_vblank_counter, .get_vblank_counter = &rs600_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -666,8 +682,10 @@ static struct radeon_asic rv515_asic = { ...@@ -666,8 +682,10 @@ static struct radeon_asic rv515_asic = {
.cs_parse = &r300_cs_parse, .cs_parse = &r300_cs_parse,
} }
}, },
.irq_set = &rs600_irq_set, .irq = {
.irq_process = &rs600_irq_process, .set = &rs600_irq_set,
.process = &rs600_irq_process,
},
.get_vblank_counter = &rs600_get_vblank_counter, .get_vblank_counter = &rs600_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -731,8 +749,10 @@ static struct radeon_asic r520_asic = { ...@@ -731,8 +749,10 @@ static struct radeon_asic r520_asic = {
.cs_parse = &r300_cs_parse, .cs_parse = &r300_cs_parse,
} }
}, },
.irq_set = &rs600_irq_set, .irq = {
.irq_process = &rs600_irq_process, .set = &rs600_irq_set,
.process = &rs600_irq_process,
},
.get_vblank_counter = &rs600_get_vblank_counter, .get_vblank_counter = &rs600_get_vblank_counter,
.copy = { .copy = {
.blit = &r100_copy_blit, .blit = &r100_copy_blit,
...@@ -795,8 +815,10 @@ static struct radeon_asic r600_asic = { ...@@ -795,8 +815,10 @@ static struct radeon_asic r600_asic = {
.cs_parse = &r600_cs_parse, .cs_parse = &r600_cs_parse,
} }
}, },
.irq_set = &r600_irq_set, .irq = {
.irq_process = &r600_irq_process, .set = &r600_irq_set,
.process = &r600_irq_process,
},
.get_vblank_counter = &rs600_get_vblank_counter, .get_vblank_counter = &rs600_get_vblank_counter,
.copy = { .copy = {
.blit = &r600_copy_blit, .blit = &r600_copy_blit,
...@@ -859,8 +881,10 @@ static struct radeon_asic rs780_asic = { ...@@ -859,8 +881,10 @@ static struct radeon_asic rs780_asic = {
.cs_parse = &r600_cs_parse, .cs_parse = &r600_cs_parse,
} }
}, },
.irq_set = &r600_irq_set, .irq = {
.irq_process = &r600_irq_process, .set = &r600_irq_set,
.process = &r600_irq_process,
},
.get_vblank_counter = &rs600_get_vblank_counter, .get_vblank_counter = &rs600_get_vblank_counter,
.copy = { .copy = {
.blit = &r600_copy_blit, .blit = &r600_copy_blit,
...@@ -923,8 +947,10 @@ static struct radeon_asic rv770_asic = { ...@@ -923,8 +947,10 @@ static struct radeon_asic rv770_asic = {
.cs_parse = &r600_cs_parse, .cs_parse = &r600_cs_parse,
} }
}, },
.irq_set = &r600_irq_set, .irq = {
.irq_process = &r600_irq_process, .set = &r600_irq_set,
.process = &r600_irq_process,
},
.get_vblank_counter = &rs600_get_vblank_counter, .get_vblank_counter = &rs600_get_vblank_counter,
.copy = { .copy = {
.blit = &r600_copy_blit, .blit = &r600_copy_blit,
...@@ -987,8 +1013,10 @@ static struct radeon_asic evergreen_asic = { ...@@ -987,8 +1013,10 @@ static struct radeon_asic evergreen_asic = {
.cs_parse = &evergreen_cs_parse, .cs_parse = &evergreen_cs_parse,
} }
}, },
.irq_set = &evergreen_irq_set, .irq = {
.irq_process = &evergreen_irq_process, .set = &evergreen_irq_set,
.process = &evergreen_irq_process,
},
.get_vblank_counter = &evergreen_get_vblank_counter, .get_vblank_counter = &evergreen_get_vblank_counter,
.copy = { .copy = {
.blit = &r600_copy_blit, .blit = &r600_copy_blit,
...@@ -1051,8 +1079,10 @@ static struct radeon_asic sumo_asic = { ...@@ -1051,8 +1079,10 @@ static struct radeon_asic sumo_asic = {
.cs_parse = &evergreen_cs_parse, .cs_parse = &evergreen_cs_parse,
}, },
}, },
.irq_set = &evergreen_irq_set, .irq = {
.irq_process = &evergreen_irq_process, .set = &evergreen_irq_set,
.process = &evergreen_irq_process,
},
.get_vblank_counter = &evergreen_get_vblank_counter, .get_vblank_counter = &evergreen_get_vblank_counter,
.copy = { .copy = {
.blit = &r600_copy_blit, .blit = &r600_copy_blit,
...@@ -1115,8 +1145,10 @@ static struct radeon_asic btc_asic = { ...@@ -1115,8 +1145,10 @@ static struct radeon_asic btc_asic = {
.cs_parse = &evergreen_cs_parse, .cs_parse = &evergreen_cs_parse,
} }
}, },
.irq_set = &evergreen_irq_set, .irq = {
.irq_process = &evergreen_irq_process, .set = &evergreen_irq_set,
.process = &evergreen_irq_process,
},
.get_vblank_counter = &evergreen_get_vblank_counter, .get_vblank_counter = &evergreen_get_vblank_counter,
.copy = { .copy = {
.blit = &r600_copy_blit, .blit = &r600_copy_blit,
...@@ -1204,8 +1236,10 @@ static struct radeon_asic cayman_asic = { ...@@ -1204,8 +1236,10 @@ static struct radeon_asic cayman_asic = {
.cs_parse = &evergreen_cs_parse, .cs_parse = &evergreen_cs_parse,
} }
}, },
.irq_set = &evergreen_irq_set, .irq = {
.irq_process = &evergreen_irq_process, .set = &evergreen_irq_set,
.process = &evergreen_irq_process,
},
.get_vblank_counter = &evergreen_get_vblank_counter, .get_vblank_counter = &evergreen_get_vblank_counter,
.copy = { .copy = {
.blit = &r600_copy_blit, .blit = &r600_copy_blit,
......
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