You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "A bunch of fixes for radeon, intel, omap and one amdkfd fix. Radeon fixes are all over, but it does fix some cursor corruption across suspend/resume. i915 should fix the second warn you were seeing, so let us know if not. omap is a bunch of small fixes" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (28 commits) drm/radeon: disable vce init on cayman (v2) drm/amdgpu: fix timeout calculation drm/radeon: check if BO_VA is set before adding it to the invalidation list drm/radeon: allways add the VM clear duplicate Revert "Revert "drm/radeon: dont switch vt on suspend"" drm/radeon: Fold radeon_set_cursor() into radeon_show_cursor() drm/radeon: unpin cursor BOs on suspend and pin them again on resume (v2) drm/radeon: Clean up reference counting and pinning of the cursor BOs drm/amdkfd: validate pdd where it acquired first Revert "drm/i915: Allocate context objects from stolen" drm/i915: Declare the swizzling unknown for L-shaped configurations drm/radeon: fix underflow in r600_cp_dispatch_texture() drm/radeon: default to 2048 MB GART size on SI+ drm/radeon: fix HDP flushing drm/radeon: use RCU query for GEM_BUSY syscall drm/amdgpu: Handle irqs only based on irq ring, not irq status regs. drm/radeon: Handle irqs only based on irq ring, not irq status regs. drm/i915: Use crtc_state->active in primary check_plane func drm/i915: Check crtc->active in intel_crtc_disable_planes drm/i915: Restore all GGTT VMAs on resume ...
This commit is contained in:
@@ -352,7 +352,7 @@ unsigned long amdgpu_gem_timeout(uint64_t timeout_ns)
|
||||
if (((int64_t)timeout_ns) < 0)
|
||||
return MAX_SCHEDULE_TIMEOUT;
|
||||
|
||||
timeout = ktime_sub_ns(ktime_get(), timeout_ns);
|
||||
timeout = ktime_sub(ns_to_ktime(timeout_ns), ktime_get());
|
||||
if (ktime_to_ns(timeout) < 0)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -3403,19 +3403,25 @@ static int dce_v10_0_crtc_irq(struct amdgpu_device *adev,
|
||||
|
||||
switch (entry->src_data) {
|
||||
case 0: /* vblank */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank)
|
||||
dce_v10_0_crtc_vblank_int_ack(adev, crtc);
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
|
||||
break;
|
||||
case 1: /* vline */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline)
|
||||
dce_v10_0_crtc_vline_int_ack(adev, crtc);
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
}
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
|
||||
|
||||
@@ -3402,19 +3402,25 @@ static int dce_v11_0_crtc_irq(struct amdgpu_device *adev,
|
||||
|
||||
switch (entry->src_data) {
|
||||
case 0: /* vblank */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank)
|
||||
dce_v11_0_crtc_vblank_int_ack(adev, crtc);
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
|
||||
break;
|
||||
case 1: /* vline */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline)
|
||||
dce_v11_0_crtc_vline_int_ack(adev, crtc);
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
}
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
|
||||
|
||||
@@ -3237,19 +3237,25 @@ static int dce_v8_0_crtc_irq(struct amdgpu_device *adev,
|
||||
|
||||
switch (entry->src_data) {
|
||||
case 0: /* vblank */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank)
|
||||
WREG32(mmLB_VBLANK_STATUS + crtc_offsets[crtc], LB_VBLANK_STATUS__VBLANK_ACK_MASK);
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
|
||||
break;
|
||||
case 1: /* vline */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline)
|
||||
WREG32(mmLB_VLINE_STATUS + crtc_offsets[crtc], LB_VLINE_STATUS__VLINE_ACK_MASK);
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
}
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
|
||||
|
||||
@@ -420,6 +420,12 @@ void kfd_unbind_process_from_device(struct kfd_dev *dev, unsigned int pasid)
|
||||
pqm_uninit(&p->pqm);
|
||||
|
||||
pdd = kfd_get_process_device_data(dev, p);
|
||||
|
||||
if (!pdd) {
|
||||
mutex_unlock(&p->mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pdd->reset_wavefronts) {
|
||||
dbgdev_wave_reset_wavefronts(pdd->dev, p);
|
||||
pdd->reset_wavefronts = false;
|
||||
@@ -431,8 +437,7 @@ void kfd_unbind_process_from_device(struct kfd_dev *dev, unsigned int pasid)
|
||||
* We don't call amd_iommu_unbind_pasid() here
|
||||
* because the IOMMU called us.
|
||||
*/
|
||||
if (pdd)
|
||||
pdd->bound = false;
|
||||
pdd->bound = false;
|
||||
|
||||
mutex_unlock(&p->mutex);
|
||||
}
|
||||
|
||||
@@ -157,9 +157,7 @@ i915_gem_alloc_context_obj(struct drm_device *dev, size_t size)
|
||||
struct drm_i915_gem_object *obj;
|
||||
int ret;
|
||||
|
||||
obj = i915_gem_object_create_stolen(dev, size);
|
||||
if (obj == NULL)
|
||||
obj = i915_gem_alloc_object(dev, size);
|
||||
obj = i915_gem_alloc_object(dev, size);
|
||||
if (obj == NULL)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
@@ -2546,6 +2546,8 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct drm_i915_gem_object *obj;
|
||||
struct i915_address_space *vm;
|
||||
struct i915_vma *vma;
|
||||
bool flush;
|
||||
|
||||
i915_check_and_clear_faults(dev);
|
||||
|
||||
@@ -2555,17 +2557,24 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
|
||||
dev_priv->gtt.base.total,
|
||||
true);
|
||||
|
||||
/* Cache flush objects bound into GGTT and rebind them. */
|
||||
vm = &dev_priv->gtt.base;
|
||||
list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
|
||||
struct i915_vma *vma = i915_gem_obj_to_vma(obj,
|
||||
&dev_priv->gtt.base);
|
||||
if (!vma)
|
||||
continue;
|
||||
flush = false;
|
||||
list_for_each_entry(vma, &obj->vma_list, vma_link) {
|
||||
if (vma->vm != vm)
|
||||
continue;
|
||||
|
||||
i915_gem_clflush_object(obj, obj->pin_display);
|
||||
WARN_ON(i915_vma_bind(vma, obj->cache_level, PIN_UPDATE));
|
||||
WARN_ON(i915_vma_bind(vma, obj->cache_level,
|
||||
PIN_UPDATE));
|
||||
|
||||
flush = true;
|
||||
}
|
||||
|
||||
if (flush)
|
||||
i915_gem_clflush_object(obj, obj->pin_display);
|
||||
}
|
||||
|
||||
|
||||
if (INTEL_INFO(dev)->gen >= 8) {
|
||||
if (IS_CHERRYVIEW(dev) || IS_BROXTON(dev))
|
||||
chv_setup_private_ppat(dev_priv);
|
||||
|
||||
@@ -183,8 +183,18 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
|
||||
if (IS_GEN4(dev)) {
|
||||
uint32_t ddc2 = I915_READ(DCC2);
|
||||
|
||||
if (!(ddc2 & DCC2_MODIFIED_ENHANCED_DISABLE))
|
||||
if (!(ddc2 & DCC2_MODIFIED_ENHANCED_DISABLE)) {
|
||||
/* Since the swizzling may vary within an
|
||||
* object, we have no idea what the swizzling
|
||||
* is for any page in particular. Thus we
|
||||
* cannot migrate tiled pages using the GPU,
|
||||
* nor can we tell userspace what the exact
|
||||
* swizzling is for any object.
|
||||
*/
|
||||
dev_priv->quirks |= QUIRK_PIN_SWIZZLED_PAGES;
|
||||
swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
|
||||
swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
if (dcc == 0xffffffff) {
|
||||
|
||||
@@ -4854,6 +4854,9 @@ static void intel_crtc_disable_planes(struct drm_crtc *crtc)
|
||||
struct intel_plane *intel_plane;
|
||||
int pipe = intel_crtc->pipe;
|
||||
|
||||
if (!intel_crtc->active)
|
||||
return;
|
||||
|
||||
intel_crtc_wait_for_pending_flips(crtc);
|
||||
|
||||
intel_pre_disable_primary(crtc);
|
||||
@@ -7887,7 +7890,7 @@ static void chv_crtc_clock_get(struct intel_crtc *crtc,
|
||||
int pipe = pipe_config->cpu_transcoder;
|
||||
enum dpio_channel port = vlv_pipe_to_channel(pipe);
|
||||
intel_clock_t clock;
|
||||
u32 cmn_dw13, pll_dw0, pll_dw1, pll_dw2;
|
||||
u32 cmn_dw13, pll_dw0, pll_dw1, pll_dw2, pll_dw3;
|
||||
int refclk = 100000;
|
||||
|
||||
mutex_lock(&dev_priv->sb_lock);
|
||||
@@ -7895,10 +7898,13 @@ static void chv_crtc_clock_get(struct intel_crtc *crtc,
|
||||
pll_dw0 = vlv_dpio_read(dev_priv, pipe, CHV_PLL_DW0(port));
|
||||
pll_dw1 = vlv_dpio_read(dev_priv, pipe, CHV_PLL_DW1(port));
|
||||
pll_dw2 = vlv_dpio_read(dev_priv, pipe, CHV_PLL_DW2(port));
|
||||
pll_dw3 = vlv_dpio_read(dev_priv, pipe, CHV_PLL_DW3(port));
|
||||
mutex_unlock(&dev_priv->sb_lock);
|
||||
|
||||
clock.m1 = (pll_dw1 & 0x7) == DPIO_CHV_M1_DIV_BY_2 ? 2 : 0;
|
||||
clock.m2 = ((pll_dw0 & 0xff) << 22) | (pll_dw2 & 0x3fffff);
|
||||
clock.m2 = (pll_dw0 & 0xff) << 22;
|
||||
if (pll_dw3 & DPIO_CHV_FRAC_DIV_EN)
|
||||
clock.m2 |= pll_dw2 & 0x3fffff;
|
||||
clock.n = (pll_dw1 >> DPIO_CHV_N_DIV_SHIFT) & 0xf;
|
||||
clock.p1 = (cmn_dw13 >> DPIO_CHV_P1_DIV_SHIFT) & 0x7;
|
||||
clock.p2 = (cmn_dw13 >> DPIO_CHV_P2_DIV_SHIFT) & 0x1f;
|
||||
@@ -13270,7 +13276,7 @@ intel_check_primary_plane(struct drm_plane *plane,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (intel_crtc->active) {
|
||||
if (crtc_state->base.active) {
|
||||
struct intel_plane_state *old_state =
|
||||
to_intel_plane_state(plane->state);
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ static int dmm_txn_commit(struct dmm_txn *txn, bool wait)
|
||||
|
||||
if (wait) {
|
||||
if (!wait_for_completion_timeout(&engine->compl,
|
||||
msecs_to_jiffies(1))) {
|
||||
msecs_to_jiffies(100))) {
|
||||
dev_err(dmm->dev, "timed out waiting for done\n");
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
|
||||
struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p);
|
||||
int omap_framebuffer_pin(struct drm_framebuffer *fb);
|
||||
int omap_framebuffer_unpin(struct drm_framebuffer *fb);
|
||||
void omap_framebuffer_unpin(struct drm_framebuffer *fb);
|
||||
void omap_framebuffer_update_scanout(struct drm_framebuffer *fb,
|
||||
struct omap_drm_window *win, struct omap_overlay_info *info);
|
||||
struct drm_connector *omap_framebuffer_get_next_connector(
|
||||
@@ -211,7 +211,7 @@ void omap_gem_dma_sync(struct drm_gem_object *obj,
|
||||
enum dma_data_direction dir);
|
||||
int omap_gem_get_paddr(struct drm_gem_object *obj,
|
||||
dma_addr_t *paddr, bool remap);
|
||||
int omap_gem_put_paddr(struct drm_gem_object *obj);
|
||||
void omap_gem_put_paddr(struct drm_gem_object *obj);
|
||||
int omap_gem_get_pages(struct drm_gem_object *obj, struct page ***pages,
|
||||
bool remap);
|
||||
int omap_gem_put_pages(struct drm_gem_object *obj);
|
||||
@@ -236,7 +236,7 @@ static inline int align_pitch(int pitch, int width, int bpp)
|
||||
/* PVR needs alignment to 8 pixels.. right now that is the most
|
||||
* restrictive stride requirement..
|
||||
*/
|
||||
return ALIGN(pitch, 8 * bytespp);
|
||||
return roundup(pitch, 8 * bytespp);
|
||||
}
|
||||
|
||||
/* map crtc to vblank mask */
|
||||
|
||||
@@ -287,10 +287,10 @@ fail:
|
||||
}
|
||||
|
||||
/* unpin, no longer being scanned out: */
|
||||
int omap_framebuffer_unpin(struct drm_framebuffer *fb)
|
||||
void omap_framebuffer_unpin(struct drm_framebuffer *fb)
|
||||
{
|
||||
struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb);
|
||||
int ret, i, n = drm_format_num_planes(fb->pixel_format);
|
||||
int i, n = drm_format_num_planes(fb->pixel_format);
|
||||
|
||||
mutex_lock(&omap_fb->lock);
|
||||
|
||||
@@ -298,24 +298,16 @@ int omap_framebuffer_unpin(struct drm_framebuffer *fb)
|
||||
|
||||
if (omap_fb->pin_count > 0) {
|
||||
mutex_unlock(&omap_fb->lock);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
struct plane *plane = &omap_fb->planes[i];
|
||||
ret = omap_gem_put_paddr(plane->bo);
|
||||
if (ret)
|
||||
goto fail;
|
||||
omap_gem_put_paddr(plane->bo);
|
||||
plane->paddr = 0;
|
||||
}
|
||||
|
||||
mutex_unlock(&omap_fb->lock);
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
mutex_unlock(&omap_fb->lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p)
|
||||
|
||||
@@ -135,7 +135,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
|
||||
fbdev->ywrap_enabled = priv->has_dmm && ywrap_enabled;
|
||||
if (fbdev->ywrap_enabled) {
|
||||
/* need to align pitch to page size if using DMM scrolling */
|
||||
mode_cmd.pitches[0] = ALIGN(mode_cmd.pitches[0], PAGE_SIZE);
|
||||
mode_cmd.pitches[0] = PAGE_ALIGN(mode_cmd.pitches[0]);
|
||||
}
|
||||
|
||||
/* allocate backing bo */
|
||||
|
||||
@@ -808,10 +808,10 @@ fail:
|
||||
/* Release physical address, when DMA is no longer being performed.. this
|
||||
* could potentially unpin and unmap buffers from TILER
|
||||
*/
|
||||
int omap_gem_put_paddr(struct drm_gem_object *obj)
|
||||
void omap_gem_put_paddr(struct drm_gem_object *obj)
|
||||
{
|
||||
struct omap_gem_object *omap_obj = to_omap_bo(obj);
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&obj->dev->struct_mutex);
|
||||
if (omap_obj->paddr_cnt > 0) {
|
||||
@@ -821,7 +821,6 @@ int omap_gem_put_paddr(struct drm_gem_object *obj)
|
||||
if (ret) {
|
||||
dev_err(obj->dev->dev,
|
||||
"could not unpin pages: %d\n", ret);
|
||||
goto fail;
|
||||
}
|
||||
ret = tiler_release(omap_obj->block);
|
||||
if (ret) {
|
||||
@@ -832,9 +831,8 @@ int omap_gem_put_paddr(struct drm_gem_object *obj)
|
||||
omap_obj->block = NULL;
|
||||
}
|
||||
}
|
||||
fail:
|
||||
|
||||
mutex_unlock(&obj->dev->struct_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Get rotated scanout address (only valid if already pinned), at the
|
||||
@@ -1378,11 +1376,7 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
|
||||
|
||||
omap_obj = kzalloc(sizeof(*omap_obj), GFP_KERNEL);
|
||||
if (!omap_obj)
|
||||
goto fail;
|
||||
|
||||
spin_lock(&priv->list_lock);
|
||||
list_add(&omap_obj->mm_list, &priv->obj_list);
|
||||
spin_unlock(&priv->list_lock);
|
||||
return NULL;
|
||||
|
||||
obj = &omap_obj->base;
|
||||
|
||||
@@ -1392,11 +1386,19 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
|
||||
*/
|
||||
omap_obj->vaddr = dma_alloc_writecombine(dev->dev, size,
|
||||
&omap_obj->paddr, GFP_KERNEL);
|
||||
if (omap_obj->vaddr)
|
||||
flags |= OMAP_BO_DMA;
|
||||
if (!omap_obj->vaddr) {
|
||||
kfree(omap_obj);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
flags |= OMAP_BO_DMA;
|
||||
}
|
||||
|
||||
spin_lock(&priv->list_lock);
|
||||
list_add(&omap_obj->mm_list, &priv->obj_list);
|
||||
spin_unlock(&priv->list_lock);
|
||||
|
||||
omap_obj->flags = flags;
|
||||
|
||||
if (flags & OMAP_BO_TILED) {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_plane_helper.h>
|
||||
|
||||
@@ -153,9 +154,34 @@ static void omap_plane_atomic_disable(struct drm_plane *plane,
|
||||
dispc_ovl_enable(omap_plane->id, false);
|
||||
}
|
||||
|
||||
static int omap_plane_atomic_check(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
{
|
||||
struct drm_crtc_state *crtc_state;
|
||||
|
||||
if (!state->crtc)
|
||||
return 0;
|
||||
|
||||
crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);
|
||||
if (IS_ERR(crtc_state))
|
||||
return PTR_ERR(crtc_state);
|
||||
|
||||
if (state->crtc_x < 0 || state->crtc_y < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (state->crtc_x + state->crtc_w > crtc_state->adjusted_mode.hdisplay)
|
||||
return -EINVAL;
|
||||
|
||||
if (state->crtc_y + state->crtc_h > crtc_state->adjusted_mode.vdisplay)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct drm_plane_helper_funcs omap_plane_helper_funcs = {
|
||||
.prepare_fb = omap_plane_prepare_fb,
|
||||
.cleanup_fb = omap_plane_cleanup_fb,
|
||||
.atomic_check = omap_plane_atomic_check,
|
||||
.atomic_update = omap_plane_atomic_update,
|
||||
.atomic_disable = omap_plane_atomic_disable,
|
||||
};
|
||||
|
||||
+192
-144
@@ -7964,23 +7964,27 @@ restart_ih:
|
||||
case 1: /* D1 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D1 vblank */
|
||||
if (rdev->irq.stat_regs.cik.disp_int & LB_D1_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[0]) {
|
||||
drm_handle_vblank(rdev->ddev, 0);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[0]))
|
||||
radeon_crtc_handle_vblank(rdev, 0);
|
||||
rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int & LB_D1_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[0]) {
|
||||
drm_handle_vblank(rdev->ddev, 0);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[0]))
|
||||
radeon_crtc_handle_vblank(rdev, 0);
|
||||
rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D1 vline */
|
||||
if (rdev->irq.stat_regs.cik.disp_int & LB_D1_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int & LB_D1_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -7990,23 +7994,27 @@ restart_ih:
|
||||
case 2: /* D2 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D2 vblank */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[1]) {
|
||||
drm_handle_vblank(rdev->ddev, 1);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[1]))
|
||||
radeon_crtc_handle_vblank(rdev, 1);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[1]) {
|
||||
drm_handle_vblank(rdev->ddev, 1);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[1]))
|
||||
radeon_crtc_handle_vblank(rdev, 1);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D2 vline */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -8016,23 +8024,27 @@ restart_ih:
|
||||
case 3: /* D3 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D3 vblank */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[2]) {
|
||||
drm_handle_vblank(rdev->ddev, 2);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[2]))
|
||||
radeon_crtc_handle_vblank(rdev, 2);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D3 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[2]) {
|
||||
drm_handle_vblank(rdev->ddev, 2);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[2]))
|
||||
radeon_crtc_handle_vblank(rdev, 2);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D3 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D3 vline */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D3 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D3 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -8042,23 +8054,27 @@ restart_ih:
|
||||
case 4: /* D4 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D4 vblank */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[3]) {
|
||||
drm_handle_vblank(rdev->ddev, 3);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[3]))
|
||||
radeon_crtc_handle_vblank(rdev, 3);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D4 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[3]) {
|
||||
drm_handle_vblank(rdev->ddev, 3);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[3]))
|
||||
radeon_crtc_handle_vblank(rdev, 3);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D4 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D4 vline */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D4 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D4 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -8068,23 +8084,27 @@ restart_ih:
|
||||
case 5: /* D5 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D5 vblank */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[4]) {
|
||||
drm_handle_vblank(rdev->ddev, 4);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[4]))
|
||||
radeon_crtc_handle_vblank(rdev, 4);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D5 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[4]) {
|
||||
drm_handle_vblank(rdev->ddev, 4);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[4]))
|
||||
radeon_crtc_handle_vblank(rdev, 4);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D5 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D5 vline */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D5 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D5 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -8094,23 +8114,27 @@ restart_ih:
|
||||
case 6: /* D6 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D6 vblank */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[5]) {
|
||||
drm_handle_vblank(rdev->ddev, 5);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[5]))
|
||||
radeon_crtc_handle_vblank(rdev, 5);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D6 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[5]) {
|
||||
drm_handle_vblank(rdev->ddev, 5);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[5]))
|
||||
radeon_crtc_handle_vblank(rdev, 5);
|
||||
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D6 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D6 vline */
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D6 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D6 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -8130,88 +8154,112 @@ restart_ih:
|
||||
case 42: /* HPD hotplug */
|
||||
switch (src_data) {
|
||||
case 0:
|
||||
if (rdev->irq.stat_regs.cik.disp_int & DC_HPD1_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD1\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int & DC_HPD1_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD1\n");
|
||||
|
||||
break;
|
||||
case 1:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD2\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD2\n");
|
||||
|
||||
break;
|
||||
case 2:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD3\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD3\n");
|
||||
|
||||
break;
|
||||
case 3:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD4\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD4\n");
|
||||
|
||||
break;
|
||||
case 4:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD5\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD5\n");
|
||||
|
||||
break;
|
||||
case 5:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD6\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD6\n");
|
||||
|
||||
break;
|
||||
case 6:
|
||||
if (rdev->irq.stat_regs.cik.disp_int & DC_HPD1_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 1\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int & DC_HPD1_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 1\n");
|
||||
|
||||
break;
|
||||
case 7:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 2\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 2\n");
|
||||
|
||||
break;
|
||||
case 8:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 3\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 3\n");
|
||||
|
||||
break;
|
||||
case 9:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 4\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 4\n");
|
||||
|
||||
break;
|
||||
case 10:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 5\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 5\n");
|
||||
|
||||
break;
|
||||
case 11:
|
||||
if (rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 6\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 6\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
|
||||
+217
-175
@@ -4924,7 +4924,7 @@ restart_ih:
|
||||
return IRQ_NONE;
|
||||
|
||||
rptr = rdev->ih.rptr;
|
||||
DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
|
||||
DRM_DEBUG("evergreen_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
|
||||
|
||||
/* Order reading of wptr vs. reading of IH ring data */
|
||||
rmb();
|
||||
@@ -4942,23 +4942,27 @@ restart_ih:
|
||||
case 1: /* D1 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D1 vblank */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[0]) {
|
||||
drm_handle_vblank(rdev->ddev, 0);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[0]))
|
||||
radeon_crtc_handle_vblank(rdev, 0);
|
||||
rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: D1 vblank - IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[0]) {
|
||||
drm_handle_vblank(rdev->ddev, 0);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[0]))
|
||||
radeon_crtc_handle_vblank(rdev, 0);
|
||||
rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D1 vline */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: D1 vline - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -4968,23 +4972,27 @@ restart_ih:
|
||||
case 2: /* D2 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D2 vblank */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[1]) {
|
||||
drm_handle_vblank(rdev->ddev, 1);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[1]))
|
||||
radeon_crtc_handle_vblank(rdev, 1);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: D2 vblank - IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[1]) {
|
||||
drm_handle_vblank(rdev->ddev, 1);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[1]))
|
||||
radeon_crtc_handle_vblank(rdev, 1);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D2 vline */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: D2 vline - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -4994,23 +5002,27 @@ restart_ih:
|
||||
case 3: /* D3 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D3 vblank */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[2]) {
|
||||
drm_handle_vblank(rdev->ddev, 2);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[2]))
|
||||
radeon_crtc_handle_vblank(rdev, 2);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D3 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: D3 vblank - IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[2]) {
|
||||
drm_handle_vblank(rdev->ddev, 2);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[2]))
|
||||
radeon_crtc_handle_vblank(rdev, 2);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D3 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D3 vline */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D3 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: D3 vline - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D3 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -5020,23 +5032,27 @@ restart_ih:
|
||||
case 4: /* D4 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D4 vblank */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[3]) {
|
||||
drm_handle_vblank(rdev->ddev, 3);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[3]))
|
||||
radeon_crtc_handle_vblank(rdev, 3);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D4 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: D4 vblank - IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[3]) {
|
||||
drm_handle_vblank(rdev->ddev, 3);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[3]))
|
||||
radeon_crtc_handle_vblank(rdev, 3);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D4 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D4 vline */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D4 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: D4 vline - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D4 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -5046,23 +5062,27 @@ restart_ih:
|
||||
case 5: /* D5 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D5 vblank */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[4]) {
|
||||
drm_handle_vblank(rdev->ddev, 4);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[4]))
|
||||
radeon_crtc_handle_vblank(rdev, 4);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D5 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: D5 vblank - IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[4]) {
|
||||
drm_handle_vblank(rdev->ddev, 4);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[4]))
|
||||
radeon_crtc_handle_vblank(rdev, 4);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D5 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D5 vline */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D5 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: D5 vline - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D5 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -5072,23 +5092,27 @@ restart_ih:
|
||||
case 6: /* D6 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D6 vblank */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[5]) {
|
||||
drm_handle_vblank(rdev->ddev, 5);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[5]))
|
||||
radeon_crtc_handle_vblank(rdev, 5);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D6 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: D6 vblank - IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[5]) {
|
||||
drm_handle_vblank(rdev->ddev, 5);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[5]))
|
||||
radeon_crtc_handle_vblank(rdev, 5);
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D6 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D6 vline */
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D6 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: D6 vline - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D6 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -5108,88 +5132,100 @@ restart_ih:
|
||||
case 42: /* HPD hotplug */
|
||||
switch (src_data) {
|
||||
case 0:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD1\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD1\n");
|
||||
break;
|
||||
case 1:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont & DC_HPD2_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~DC_HPD2_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD2\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & DC_HPD2_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~DC_HPD2_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD2\n");
|
||||
break;
|
||||
case 2:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & DC_HPD3_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~DC_HPD3_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD3\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & DC_HPD3_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~DC_HPD3_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD3\n");
|
||||
break;
|
||||
case 3:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & DC_HPD4_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~DC_HPD4_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD4\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & DC_HPD4_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~DC_HPD4_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD4\n");
|
||||
break;
|
||||
case 4:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & DC_HPD5_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~DC_HPD5_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD5\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & DC_HPD5_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~DC_HPD5_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD5\n");
|
||||
break;
|
||||
case 5:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & DC_HPD6_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~DC_HPD6_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD6\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & DC_HPD6_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~DC_HPD6_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD6\n");
|
||||
break;
|
||||
case 6:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 1\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 1\n");
|
||||
break;
|
||||
case 7:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont & DC_HPD2_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~DC_HPD2_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 2\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & DC_HPD2_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~DC_HPD2_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 2\n");
|
||||
break;
|
||||
case 8:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & DC_HPD3_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~DC_HPD3_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 3\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & DC_HPD3_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~DC_HPD3_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 3\n");
|
||||
break;
|
||||
case 9:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & DC_HPD4_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~DC_HPD4_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 4\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & DC_HPD4_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~DC_HPD4_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 4\n");
|
||||
break;
|
||||
case 10:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & DC_HPD5_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~DC_HPD5_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 5\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & DC_HPD5_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~DC_HPD5_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 5\n");
|
||||
break;
|
||||
case 11:
|
||||
if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & DC_HPD6_RX_INTERRUPT) {
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~DC_HPD6_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 6\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & DC_HPD6_RX_INTERRUPT))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~DC_HPD6_RX_INTERRUPT;
|
||||
queue_dp = true;
|
||||
DRM_DEBUG("IH: HPD_RX 6\n");
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -5199,46 +5235,52 @@ restart_ih:
|
||||
case 44: /* hdmi */
|
||||
switch (src_data) {
|
||||
case 0:
|
||||
if (rdev->irq.stat_regs.evergreen.afmt_status1 & AFMT_AZ_FORMAT_WTRIG) {
|
||||
rdev->irq.stat_regs.evergreen.afmt_status1 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI0\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.afmt_status1 & AFMT_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.afmt_status1 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI0\n");
|
||||
break;
|
||||
case 1:
|
||||
if (rdev->irq.stat_regs.evergreen.afmt_status2 & AFMT_AZ_FORMAT_WTRIG) {
|
||||
rdev->irq.stat_regs.evergreen.afmt_status2 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI1\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.afmt_status2 & AFMT_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.afmt_status2 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI1\n");
|
||||
break;
|
||||
case 2:
|
||||
if (rdev->irq.stat_regs.evergreen.afmt_status3 & AFMT_AZ_FORMAT_WTRIG) {
|
||||
rdev->irq.stat_regs.evergreen.afmt_status3 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI2\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.afmt_status3 & AFMT_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.afmt_status3 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI2\n");
|
||||
break;
|
||||
case 3:
|
||||
if (rdev->irq.stat_regs.evergreen.afmt_status4 & AFMT_AZ_FORMAT_WTRIG) {
|
||||
rdev->irq.stat_regs.evergreen.afmt_status4 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI3\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.afmt_status4 & AFMT_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.afmt_status4 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI3\n");
|
||||
break;
|
||||
case 4:
|
||||
if (rdev->irq.stat_regs.evergreen.afmt_status5 & AFMT_AZ_FORMAT_WTRIG) {
|
||||
rdev->irq.stat_regs.evergreen.afmt_status5 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI4\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.afmt_status5 & AFMT_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.afmt_status5 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI4\n");
|
||||
break;
|
||||
case 5:
|
||||
if (rdev->irq.stat_regs.evergreen.afmt_status6 & AFMT_AZ_FORMAT_WTRIG) {
|
||||
rdev->irq.stat_regs.evergreen.afmt_status6 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI5\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.evergreen.afmt_status6 & AFMT_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.evergreen.afmt_status6 &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI5\n");
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
|
||||
+14
-11
@@ -2162,18 +2162,20 @@ static int cayman_startup(struct radeon_device *rdev)
|
||||
DRM_ERROR("radeon: failed initializing UVD (%d).\n", r);
|
||||
}
|
||||
|
||||
ring = &rdev->ring[TN_RING_TYPE_VCE1_INDEX];
|
||||
if (ring->ring_size)
|
||||
r = radeon_ring_init(rdev, ring, ring->ring_size, 0, 0x0);
|
||||
if (rdev->family == CHIP_ARUBA) {
|
||||
ring = &rdev->ring[TN_RING_TYPE_VCE1_INDEX];
|
||||
if (ring->ring_size)
|
||||
r = radeon_ring_init(rdev, ring, ring->ring_size, 0, 0x0);
|
||||
|
||||
ring = &rdev->ring[TN_RING_TYPE_VCE2_INDEX];
|
||||
if (ring->ring_size)
|
||||
r = radeon_ring_init(rdev, ring, ring->ring_size, 0, 0x0);
|
||||
ring = &rdev->ring[TN_RING_TYPE_VCE2_INDEX];
|
||||
if (ring->ring_size)
|
||||
r = radeon_ring_init(rdev, ring, ring->ring_size, 0, 0x0);
|
||||
|
||||
if (!r)
|
||||
r = vce_v1_0_init(rdev);
|
||||
else if (r != -ENOENT)
|
||||
DRM_ERROR("radeon: failed initializing VCE (%d).\n", r);
|
||||
if (!r)
|
||||
r = vce_v1_0_init(rdev);
|
||||
if (r)
|
||||
DRM_ERROR("radeon: failed initializing VCE (%d).\n", r);
|
||||
}
|
||||
|
||||
r = radeon_ib_pool_init(rdev);
|
||||
if (r) {
|
||||
@@ -2396,7 +2398,8 @@ void cayman_fini(struct radeon_device *rdev)
|
||||
radeon_irq_kms_fini(rdev);
|
||||
uvd_v1_0_fini(rdev);
|
||||
radeon_uvd_fini(rdev);
|
||||
radeon_vce_fini(rdev);
|
||||
if (rdev->family == CHIP_ARUBA)
|
||||
radeon_vce_fini(rdev);
|
||||
cayman_pcie_gart_fini(rdev);
|
||||
r600_vram_scratch_fini(rdev);
|
||||
radeon_gem_fini(rdev);
|
||||
|
||||
@@ -4086,23 +4086,27 @@ restart_ih:
|
||||
case 1: /* D1 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D1 vblank */
|
||||
if (rdev->irq.stat_regs.r600.disp_int & LB_D1_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[0]) {
|
||||
drm_handle_vblank(rdev->ddev, 0);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[0]))
|
||||
radeon_crtc_handle_vblank(rdev, 0);
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int & LB_D1_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: D1 vblank - IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[0]) {
|
||||
drm_handle_vblank(rdev->ddev, 0);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[0]))
|
||||
radeon_crtc_handle_vblank(rdev, 0);
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D1 vline */
|
||||
if (rdev->irq.stat_regs.r600.disp_int & LB_D1_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int & LB_D1_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: D1 vline - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D1 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -4112,23 +4116,27 @@ restart_ih:
|
||||
case 5: /* D2 vblank/vline */
|
||||
switch (src_data) {
|
||||
case 0: /* D2 vblank */
|
||||
if (rdev->irq.stat_regs.r600.disp_int & LB_D2_VBLANK_INTERRUPT) {
|
||||
if (rdev->irq.crtc_vblank_int[1]) {
|
||||
drm_handle_vblank(rdev->ddev, 1);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[1]))
|
||||
radeon_crtc_handle_vblank(rdev, 1);
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vblank\n");
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int & LB_D2_VBLANK_INTERRUPT))
|
||||
DRM_DEBUG("IH: D2 vblank - IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (rdev->irq.crtc_vblank_int[1]) {
|
||||
drm_handle_vblank(rdev->ddev, 1);
|
||||
rdev->pm.vblank_sync = true;
|
||||
wake_up(&rdev->irq.vblank_queue);
|
||||
}
|
||||
if (atomic_read(&rdev->irq.pflip[1]))
|
||||
radeon_crtc_handle_vblank(rdev, 1);
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VBLANK_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vblank\n");
|
||||
|
||||
break;
|
||||
case 1: /* D1 vline */
|
||||
if (rdev->irq.stat_regs.r600.disp_int & LB_D2_VLINE_INTERRUPT) {
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vline\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int & LB_D2_VLINE_INTERRUPT))
|
||||
DRM_DEBUG("IH: D2 vline - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VLINE_INTERRUPT;
|
||||
DRM_DEBUG("IH: D2 vline\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -4148,46 +4156,53 @@ restart_ih:
|
||||
case 19: /* HPD/DAC hotplug */
|
||||
switch (src_data) {
|
||||
case 0:
|
||||
if (rdev->irq.stat_regs.r600.disp_int & DC_HPD1_INTERRUPT) {
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~DC_HPD1_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD1\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int & DC_HPD1_INTERRUPT))
|
||||
DRM_DEBUG("IH: HPD1 - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~DC_HPD1_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD1\n");
|
||||
break;
|
||||
case 1:
|
||||
if (rdev->irq.stat_regs.r600.disp_int & DC_HPD2_INTERRUPT) {
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~DC_HPD2_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD2\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int & DC_HPD2_INTERRUPT))
|
||||
DRM_DEBUG("IH: HPD2 - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.disp_int &= ~DC_HPD2_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD2\n");
|
||||
break;
|
||||
case 4:
|
||||
if (rdev->irq.stat_regs.r600.disp_int_cont & DC_HPD3_INTERRUPT) {
|
||||
rdev->irq.stat_regs.r600.disp_int_cont &= ~DC_HPD3_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD3\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int_cont & DC_HPD3_INTERRUPT))
|
||||
DRM_DEBUG("IH: HPD3 - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.disp_int_cont &= ~DC_HPD3_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD3\n");
|
||||
break;
|
||||
case 5:
|
||||
if (rdev->irq.stat_regs.r600.disp_int_cont & DC_HPD4_INTERRUPT) {
|
||||
rdev->irq.stat_regs.r600.disp_int_cont &= ~DC_HPD4_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD4\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int_cont & DC_HPD4_INTERRUPT))
|
||||
DRM_DEBUG("IH: HPD4 - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.disp_int_cont &= ~DC_HPD4_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD4\n");
|
||||
break;
|
||||
case 10:
|
||||
if (rdev->irq.stat_regs.r600.disp_int_cont2 & DC_HPD5_INTERRUPT) {
|
||||
rdev->irq.stat_regs.r600.disp_int_cont2 &= ~DC_HPD5_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD5\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int_cont2 & DC_HPD5_INTERRUPT))
|
||||
DRM_DEBUG("IH: HPD5 - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.disp_int_cont2 &= ~DC_HPD5_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD5\n");
|
||||
break;
|
||||
case 12:
|
||||
if (rdev->irq.stat_regs.r600.disp_int_cont2 & DC_HPD6_INTERRUPT) {
|
||||
rdev->irq.stat_regs.r600.disp_int_cont2 &= ~DC_HPD6_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD6\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.disp_int_cont2 & DC_HPD6_INTERRUPT))
|
||||
DRM_DEBUG("IH: HPD6 - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.disp_int_cont2 &= ~DC_HPD6_INTERRUPT;
|
||||
queue_hotplug = true;
|
||||
DRM_DEBUG("IH: HPD6\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
@@ -4197,18 +4212,22 @@ restart_ih:
|
||||
case 21: /* hdmi */
|
||||
switch (src_data) {
|
||||
case 4:
|
||||
if (rdev->irq.stat_regs.r600.hdmi0_status & HDMI0_AZ_FORMAT_WTRIG) {
|
||||
rdev->irq.stat_regs.r600.hdmi0_status &= ~HDMI0_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI0\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.hdmi0_status & HDMI0_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: HDMI0 - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.hdmi0_status &= ~HDMI0_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI0\n");
|
||||
|
||||
break;
|
||||
case 5:
|
||||
if (rdev->irq.stat_regs.r600.hdmi1_status & HDMI0_AZ_FORMAT_WTRIG) {
|
||||
rdev->irq.stat_regs.r600.hdmi1_status &= ~HDMI0_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI1\n");
|
||||
}
|
||||
if (!(rdev->irq.stat_regs.r600.hdmi1_status & HDMI0_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: HDMI1 - IH event w/o asserted irq bit?\n");
|
||||
|
||||
rdev->irq.stat_regs.r600.hdmi1_status &= ~HDMI0_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI1\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
|
||||
@@ -2483,7 +2483,7 @@ int r600_cp_dispatch_texture(struct drm_device *dev,
|
||||
struct drm_buf *buf;
|
||||
u32 *buffer;
|
||||
const u8 __user *data;
|
||||
int size, pass_size;
|
||||
unsigned int size, pass_size;
|
||||
u64 src_offset, dst_offset;
|
||||
|
||||
if (!radeon_check_offset(dev_priv, tex->offset)) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user