This source file includes following definitions.
- gma_blt_wait_idle
1
2
3
4
5
6
7
8
9 #include "psb_drv.h"
10
11 #include "blitter.h"
12 #include "psb_reg.h"
13
14
15 int gma_blt_wait_idle(struct drm_psb_private *dev_priv)
16 {
17 unsigned long stop = jiffies + HZ;
18 int busy = 1;
19
20
21 if (IS_CDV(dev_priv->dev))
22 return 0;
23
24
25 if ((PSB_RSGX32(PSB_CR_2D_SOCIF) == _PSB_C2_SOCIF_EMPTY) &&
26 ((PSB_RSGX32(PSB_CR_2D_BLIT_STATUS) & _PSB_C2B_STATUS_BUSY) == 0))
27 return 0;
28
29 do {
30 busy = (PSB_RSGX32(PSB_CR_2D_SOCIF) != _PSB_C2_SOCIF_EMPTY);
31 } while (busy && !time_after_eq(jiffies, stop));
32
33 if (busy)
34 return -EBUSY;
35
36 do {
37 busy = ((PSB_RSGX32(PSB_CR_2D_BLIT_STATUS) &
38 _PSB_C2B_STATUS_BUSY) != 0);
39 } while (busy && !time_after_eq(jiffies, stop));
40
41
42 return (busy) ? -EBUSY : 0;
43 }