-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gma500-next' of git://github.com/patjak/drm-gma500 into…
… drm-next Summary of what's included: - SGX MMU support - SGX IRQ handling (Page faults and blitter fences) - Minor Cedarview and Poulsbo unification - Work queue for ASLE interrupt work - Various cleanups, style fixes and removal of dead code * 'gma500-next' of git://github.com/patjak/drm-gma500: drm/gma500: remove stub .open/postclose drm/gma500: Code cleanup - inline documentation drm/gma500: Code cleanup - style fixes drm/gma500: Code cleanup - removal of centralized exiting of function drm/gma500/cdv: Cedarview display cleanups drm/gma500: Unify encoder mode fixup drm/gma500: Unify _get_core_freq for cdv and psb drm/gma500: Move asle interrupt work into a work task drm/gma500: Remove dead code drm/gma500: Add backing type and base align to psb_gem_create() drm/gma500: Remove unused ioctls drm/gma500: Always trap MMU page faults drm/gma500: Hook up the MMU drm/gma500: Add first piece of blitter code drm/gma500: Give MMU code it's own header file drm/gma500: Add support for SGX interrupts drm/gma500: Make SGX MMU driver actually do something
- Loading branch information
Showing
27 changed files
with
722 additions
and
952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 2014, Patrik Jakobsson | ||
* All Rights Reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* Authors: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | ||
*/ | ||
|
||
#include "psb_drv.h" | ||
|
||
#include "blitter.h" | ||
#include "psb_reg.h" | ||
|
||
/* Wait for the blitter to be completely idle */ | ||
int gma_blt_wait_idle(struct drm_psb_private *dev_priv) | ||
{ | ||
unsigned long stop = jiffies + HZ; | ||
int busy = 1; | ||
|
||
/* NOP for Cedarview */ | ||
if (IS_CDV(dev_priv->dev)) | ||
return 0; | ||
|
||
/* First do a quick check */ | ||
if ((PSB_RSGX32(PSB_CR_2D_SOCIF) == _PSB_C2_SOCIF_EMPTY) && | ||
((PSB_RSGX32(PSB_CR_2D_BLIT_STATUS) & _PSB_C2B_STATUS_BUSY) == 0)) | ||
return 0; | ||
|
||
do { | ||
busy = (PSB_RSGX32(PSB_CR_2D_SOCIF) != _PSB_C2_SOCIF_EMPTY); | ||
} while (busy && !time_after_eq(jiffies, stop)); | ||
|
||
if (busy) | ||
return -EBUSY; | ||
|
||
do { | ||
busy = ((PSB_RSGX32(PSB_CR_2D_BLIT_STATUS) & | ||
_PSB_C2B_STATUS_BUSY) != 0); | ||
} while (busy && !time_after_eq(jiffies, stop)); | ||
|
||
/* If still busy, we probably have a hang */ | ||
return (busy) ? -EBUSY : 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2014, Patrik Jakobsson | ||
* All Rights Reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* Authors: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | ||
*/ | ||
|
||
#ifndef __BLITTER_H | ||
#define __BLITTER_H | ||
|
||
extern int gma_blt_wait_idle(struct drm_psb_private *dev_priv); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.