aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri@ti.com>2012-04-25 20:29:06 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-11 08:17:09 -0400
commitb7dea05aec8b6421500929d5003866655d6d9dab (patch)
treed042965ba9e46ff850f388bdf099146e66e7d90e /drivers/video
parent24ccfc5541b11f1e6ffcf10f5ce94370440d6c75 (diff)
OMAPDSS: HDMI: Panel: Simplify the name of the HDMI mutex
As the hdmi_lock mutex is inside the hdmi struct, rename to simply "lock". This is only a change in the name. There are not changes in functionality. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/hdmi_panel.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c
index 533d5dc634d..5e215d6e8d0 100644
--- a/drivers/video/omap2/dss/hdmi_panel.c
+++ b/drivers/video/omap2/dss/hdmi_panel.c
@@ -30,7 +30,8 @@
30#include "dss.h" 30#include "dss.h"
31 31
32static struct { 32static struct {
33 struct mutex hdmi_lock; 33 /* This protects the panel ops, mainly when accessing the HDMI IP. */
34 struct mutex lock;
34} hdmi; 35} hdmi;
35 36
36 37
@@ -59,7 +60,7 @@ static int hdmi_panel_enable(struct omap_dss_device *dssdev)
59 int r = 0; 60 int r = 0;
60 DSSDBG("ENTER hdmi_panel_enable\n"); 61 DSSDBG("ENTER hdmi_panel_enable\n");
61 62
62 mutex_lock(&hdmi.hdmi_lock); 63 mutex_lock(&hdmi.lock);
63 64
64 if (dssdev->state != OMAP_DSS_DISPLAY_DISABLED) { 65 if (dssdev->state != OMAP_DSS_DISPLAY_DISABLED) {
65 r = -EINVAL; 66 r = -EINVAL;
@@ -75,28 +76,28 @@ static int hdmi_panel_enable(struct omap_dss_device *dssdev)
75 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 76 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
76 77
77err: 78err:
78 mutex_unlock(&hdmi.hdmi_lock); 79 mutex_unlock(&hdmi.lock);
79 80
80 return r; 81 return r;
81} 82}
82 83
83static void hdmi_panel_disable(struct omap_dss_device *dssdev) 84static void hdmi_panel_disable(struct omap_dss_device *dssdev)
84{ 85{
85 mutex_lock(&hdmi.hdmi_lock); 86 mutex_lock(&hdmi.lock);
86 87
87 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) 88 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
88 omapdss_hdmi_display_disable(dssdev); 89 omapdss_hdmi_display_disable(dssdev);
89 90
90 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; 91 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
91 92
92 mutex_unlock(&hdmi.hdmi_lock); 93 mutex_unlock(&hdmi.lock);
93} 94}
94 95
95static int hdmi_panel_suspend(struct omap_dss_device *dssdev) 96static int hdmi_panel_suspend(struct omap_dss_device *dssdev)
96{ 97{
97 int r = 0; 98 int r = 0;
98 99
99 mutex_lock(&hdmi.hdmi_lock); 100 mutex_lock(&hdmi.lock);
100 101
101 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { 102 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) {
102 r = -EINVAL; 103 r = -EINVAL;
@@ -108,7 +109,7 @@ static int hdmi_panel_suspend(struct omap_dss_device *dssdev)
108 omapdss_hdmi_display_disable(dssdev); 109 omapdss_hdmi_display_disable(dssdev);
109 110
110err: 111err:
111 mutex_unlock(&hdmi.hdmi_lock); 112 mutex_unlock(&hdmi.lock);
112 113
113 return r; 114 return r;
114} 115}
@@ -117,7 +118,7 @@ static int hdmi_panel_resume(struct omap_dss_device *dssdev)
117{ 118{
118 int r = 0; 119 int r = 0;
119 120
120 mutex_lock(&hdmi.hdmi_lock); 121 mutex_lock(&hdmi.lock);
121 122
122 if (dssdev->state != OMAP_DSS_DISPLAY_SUSPENDED) { 123 if (dssdev->state != OMAP_DSS_DISPLAY_SUSPENDED) {
123 r = -EINVAL; 124 r = -EINVAL;
@@ -133,7 +134,7 @@ static int hdmi_panel_resume(struct omap_dss_device *dssdev)
133 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 134 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
134 135
135err: 136err:
136 mutex_unlock(&hdmi.hdmi_lock); 137 mutex_unlock(&hdmi.lock);
137 138
138 return r; 139 return r;
139} 140}
@@ -141,11 +142,11 @@ err:
141static void hdmi_get_timings(struct omap_dss_device *dssdev, 142static void hdmi_get_timings(struct omap_dss_device *dssdev,
142 struct omap_video_timings *timings) 143 struct omap_video_timings *timings)
143{ 144{
144 mutex_lock(&hdmi.hdmi_lock); 145 mutex_lock(&hdmi.lock);
145 146
146 *timings = dssdev->panel.timings; 147 *timings = dssdev->panel.timings;
147 148
148 mutex_unlock(&hdmi.hdmi_lock); 149 mutex_unlock(&hdmi.lock);
149} 150}
150 151
151static void hdmi_set_timings(struct omap_dss_device *dssdev, 152static void hdmi_set_timings(struct omap_dss_device *dssdev,
@@ -153,12 +154,12 @@ static void hdmi_set_timings(struct omap_dss_device *dssdev,
153{ 154{
154 DSSDBG("hdmi_set_timings\n"); 155 DSSDBG("hdmi_set_timings\n");
155 156
156 mutex_lock(&hdmi.hdmi_lock); 157 mutex_lock(&hdmi.lock);
157 158
158 dssdev->panel.timings = *timings; 159 dssdev->panel.timings = *timings;
159 omapdss_hdmi_display_set_timing(dssdev); 160 omapdss_hdmi_display_set_timing(dssdev);
160 161
161 mutex_unlock(&hdmi.hdmi_lock); 162 mutex_unlock(&hdmi.lock);
162} 163}
163 164
164static int hdmi_check_timings(struct omap_dss_device *dssdev, 165static int hdmi_check_timings(struct omap_dss_device *dssdev,
@@ -168,11 +169,11 @@ static int hdmi_check_timings(struct omap_dss_device *dssdev,
168 169
169 DSSDBG("hdmi_check_timings\n"); 170 DSSDBG("hdmi_check_timings\n");
170 171
171 mutex_lock(&hdmi.hdmi_lock); 172 mutex_lock(&hdmi.lock);
172 173
173 r = omapdss_hdmi_display_check_timing(dssdev, timings); 174 r = omapdss_hdmi_display_check_timing(dssdev, timings);
174 175
175 mutex_unlock(&hdmi.hdmi_lock); 176 mutex_unlock(&hdmi.lock);
176 return r; 177 return r;
177} 178}
178 179
@@ -180,7 +181,7 @@ static int hdmi_read_edid(struct omap_dss_device *dssdev, u8 *buf, int len)
180{ 181{
181 int r; 182 int r;
182 183
183 mutex_lock(&hdmi.hdmi_lock); 184 mutex_lock(&hdmi.lock);
184 185
185 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { 186 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) {
186 r = omapdss_hdmi_display_enable(dssdev); 187 r = omapdss_hdmi_display_enable(dssdev);
@@ -194,7 +195,7 @@ static int hdmi_read_edid(struct omap_dss_device *dssdev, u8 *buf, int len)
194 dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) 195 dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED)
195 omapdss_hdmi_display_disable(dssdev); 196 omapdss_hdmi_display_disable(dssdev);
196err: 197err:
197 mutex_unlock(&hdmi.hdmi_lock); 198 mutex_unlock(&hdmi.lock);
198 199
199 return r; 200 return r;
200} 201}
@@ -203,7 +204,7 @@ static bool hdmi_detect(struct omap_dss_device *dssdev)
203{ 204{
204 int r; 205 int r;
205 206
206 mutex_lock(&hdmi.hdmi_lock); 207 mutex_lock(&hdmi.lock);
207 208
208 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { 209 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) {
209 r = omapdss_hdmi_display_enable(dssdev); 210 r = omapdss_hdmi_display_enable(dssdev);
@@ -217,7 +218,7 @@ static bool hdmi_detect(struct omap_dss_device *dssdev)
217 dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) 218 dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED)
218 omapdss_hdmi_display_disable(dssdev); 219 omapdss_hdmi_display_disable(dssdev);
219err: 220err:
220 mutex_unlock(&hdmi.hdmi_lock); 221 mutex_unlock(&hdmi.lock);
221 222
222 return r; 223 return r;
223} 224}
@@ -242,7 +243,7 @@ static struct omap_dss_driver hdmi_driver = {
242 243
243int hdmi_panel_init(void) 244int hdmi_panel_init(void)
244{ 245{
245 mutex_init(&hdmi.hdmi_lock); 246 mutex_init(&hdmi.lock);
246 247
247 omap_dss_register_driver(&hdmi_driver); 248 omap_dss_register_driver(&hdmi_driver);
248 249