Skip to content

Commit 5c209d8

Browse files
committed
drm/gma500: psb_spank() doesn't need it's own file
Since everything else in accel_2d.c got removed we can move psb_spank() into psb_drv.c where it is used. Signed-off-by: Patrik Jakobsson <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 93b0bb5 commit 5c209d8

File tree

3 files changed

+31
-61
lines changed

3 files changed

+31
-61
lines changed

drivers/gpu/drm/gma500/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#
55

66
gma500_gfx-y += \
7-
accel_2d.o \
87
backlight.o \
98
blitter.o \
109
cdv_device.o \

drivers/gpu/drm/gma500/accel_2d.c

Lines changed: 0 additions & 60 deletions
This file was deleted.

drivers/gpu/drm/gma500/psb_drv.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/notifier.h>
1313
#include <linux/pm_runtime.h>
1414
#include <linux/spinlock.h>
15+
#include <linux/delay.h>
1516

1617
#include <asm/set_memory.h>
1718

@@ -91,6 +92,36 @@ MODULE_DEVICE_TABLE(pci, pciidlist);
9192
static const struct drm_ioctl_desc psb_ioctls[] = {
9293
};
9394

95+
/**
96+
* psb_spank - reset the 2D engine
97+
* @dev_priv: our PSB DRM device
98+
*
99+
* Soft reset the graphics engine and then reload the necessary registers.
100+
*/
101+
void psb_spank(struct drm_psb_private *dev_priv)
102+
{
103+
PSB_WSGX32(_PSB_CS_RESET_BIF_RESET | _PSB_CS_RESET_DPM_RESET |
104+
_PSB_CS_RESET_TA_RESET | _PSB_CS_RESET_USE_RESET |
105+
_PSB_CS_RESET_ISP_RESET | _PSB_CS_RESET_TSP_RESET |
106+
_PSB_CS_RESET_TWOD_RESET, PSB_CR_SOFT_RESET);
107+
PSB_RSGX32(PSB_CR_SOFT_RESET);
108+
109+
msleep(1);
110+
111+
PSB_WSGX32(0, PSB_CR_SOFT_RESET);
112+
wmb();
113+
PSB_WSGX32(PSB_RSGX32(PSB_CR_BIF_CTRL) | _PSB_CB_CTRL_CLEAR_FAULT,
114+
PSB_CR_BIF_CTRL);
115+
wmb();
116+
(void) PSB_RSGX32(PSB_CR_BIF_CTRL);
117+
118+
msleep(1);
119+
PSB_WSGX32(PSB_RSGX32(PSB_CR_BIF_CTRL) & ~_PSB_CB_CTRL_CLEAR_FAULT,
120+
PSB_CR_BIF_CTRL);
121+
(void) PSB_RSGX32(PSB_CR_BIF_CTRL);
122+
PSB_WSGX32(dev_priv->gtt.gatt_start, PSB_CR_BIF_TWOD_REQ_BASE);
123+
}
124+
94125
static int psb_do_init(struct drm_device *dev)
95126
{
96127
struct drm_psb_private *dev_priv = dev->dev_private;

0 commit comments

Comments
 (0)