aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_edid.h1
-rw-r--r--include/drm/drm_fixed.h14
-rw-r--r--include/drm/drm_pciids.h18
3 files changed, 26 insertions, 7 deletions
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 7b75621fda4c..a1441c5ac63d 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -260,6 +260,7 @@ struct hdmi_vendor_infoframe;
260 260
261void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid); 261void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid);
262int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads); 262int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads);
263int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb);
263int drm_av_sync_delay(struct drm_connector *connector, 264int drm_av_sync_delay(struct drm_connector *connector,
264 struct drm_display_mode *mode); 265 struct drm_display_mode *mode);
265struct drm_connector *drm_select_eld(struct drm_encoder *encoder, 266struct drm_connector *drm_select_eld(struct drm_encoder *encoder,
diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h
index f5e1168c7647..d639049a613d 100644
--- a/include/drm/drm_fixed.h
+++ b/include/drm/drm_fixed.h
@@ -84,12 +84,12 @@ static inline int drm_fixp2int(int64_t a)
84 return ((s64)a) >> DRM_FIXED_POINT; 84 return ((s64)a) >> DRM_FIXED_POINT;
85} 85}
86 86
87static inline s64 drm_fixp_msbset(int64_t a) 87static inline unsigned drm_fixp_msbset(int64_t a)
88{ 88{
89 unsigned shift, sign = (a >> 63) & 1; 89 unsigned shift, sign = (a >> 63) & 1;
90 90
91 for (shift = 62; shift > 0; --shift) 91 for (shift = 62; shift > 0; --shift)
92 if ((a >> shift) != sign) 92 if (((a >> shift) & 1) != sign)
93 return shift; 93 return shift;
94 94
95 return 0; 95 return 0;
@@ -100,9 +100,9 @@ static inline s64 drm_fixp_mul(s64 a, s64 b)
100 unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b); 100 unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b);
101 s64 result; 101 s64 result;
102 102
103 if (shift > 63) { 103 if (shift > 61) {
104 shift = shift - 63; 104 shift = shift - 61;
105 a >>= shift >> 1; 105 a >>= (shift >> 1) + (shift & 1);
106 b >>= shift >> 1; 106 b >>= shift >> 1;
107 } else 107 } else
108 shift = 0; 108 shift = 0;
@@ -120,7 +120,7 @@ static inline s64 drm_fixp_mul(s64 a, s64 b)
120 120
121static inline s64 drm_fixp_div(s64 a, s64 b) 121static inline s64 drm_fixp_div(s64 a, s64 b)
122{ 122{
123 unsigned shift = 63 - drm_fixp_msbset(a); 123 unsigned shift = 62 - drm_fixp_msbset(a);
124 s64 result; 124 s64 result;
125 125
126 a <<= shift; 126 a <<= shift;
@@ -154,7 +154,7 @@ static inline s64 drm_fixp_exp(s64 x)
154 } 154 }
155 155
156 if (x < 0) 156 if (x < 0)
157 sum = drm_fixp_div(1, sum); 157 sum = drm_fixp_div(DRM_FIXED_ONE, sum);
158 158
159 return sum; 159 return sum;
160} 160}
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
index 0a85e5c5d61b..fd54a14a7c2a 100644
--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -1,4 +1,22 @@
1#define radeon_PCI_IDS \ 1#define radeon_PCI_IDS \
2 {0x1002, 0x1304, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
3 {0x1002, 0x1305, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
4 {0x1002, 0x1306, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
5 {0x1002, 0x1307, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
6 {0x1002, 0x1309, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
7 {0x1002, 0x130A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
8 {0x1002, 0x130B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
9 {0x1002, 0x130C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
10 {0x1002, 0x130D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
11 {0x1002, 0x130E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
12 {0x1002, 0x130F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
13 {0x1002, 0x1310, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
14 {0x1002, 0x1311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
15 {0x1002, 0x1313, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
16 {0x1002, 0x1315, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
17 {0x1002, 0x1316, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
18 {0x1002, 0x131B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
19 {0x1002, 0x131C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
2 {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ 20 {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \
3 {0x1002, 0x3151, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 21 {0x1002, 0x3151, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
4 {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 22 {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \