@@ -19,29 +19,23 @@ static void msm_hdmi_power_on(struct drm_bridge *bridge)
19
19
struct hdmi_bridge * hdmi_bridge = to_hdmi_bridge (bridge );
20
20
struct hdmi * hdmi = hdmi_bridge -> hdmi ;
21
21
const struct hdmi_platform_config * config = hdmi -> config ;
22
- int i , ret ;
22
+ int ret ;
23
23
24
24
pm_runtime_get_sync (& hdmi -> pdev -> dev );
25
25
26
26
ret = regulator_bulk_enable (config -> pwr_reg_cnt , hdmi -> pwr_regs );
27
27
if (ret )
28
28
DRM_DEV_ERROR (dev -> dev , "failed to enable pwr regulator: %d\n" , ret );
29
29
30
- if (config -> pwr_clk_cnt > 0 ) {
30
+ if (hdmi -> extp_clk ) {
31
31
DBG ("pixclock: %lu" , hdmi -> pixclock );
32
- ret = clk_set_rate (hdmi -> pwr_clks [0 ], hdmi -> pixclock );
33
- if (ret ) {
34
- DRM_DEV_ERROR (dev -> dev , "failed to set pixel clk: %s (%d)\n" ,
35
- config -> pwr_clk_names [0 ], ret );
36
- }
37
- }
32
+ ret = clk_set_rate (hdmi -> extp_clk , hdmi -> pixclock );
33
+ if (ret )
34
+ DRM_DEV_ERROR (dev -> dev , "failed to set extp clk rate: %d\n" , ret );
38
35
39
- for (i = 0 ; i < config -> pwr_clk_cnt ; i ++ ) {
40
- ret = clk_prepare_enable (hdmi -> pwr_clks [i ]);
41
- if (ret ) {
42
- DRM_DEV_ERROR (dev -> dev , "failed to enable pwr clk: %s (%d)\n" ,
43
- config -> pwr_clk_names [i ], ret );
44
- }
36
+ ret = clk_prepare_enable (hdmi -> extp_clk );
37
+ if (ret )
38
+ DRM_DEV_ERROR (dev -> dev , "failed to enable extp clk: %d\n" , ret );
45
39
}
46
40
}
47
41
@@ -51,15 +45,15 @@ static void power_off(struct drm_bridge *bridge)
51
45
struct hdmi_bridge * hdmi_bridge = to_hdmi_bridge (bridge );
52
46
struct hdmi * hdmi = hdmi_bridge -> hdmi ;
53
47
const struct hdmi_platform_config * config = hdmi -> config ;
54
- int i , ret ;
48
+ int ret ;
55
49
56
50
/* TODO do we need to wait for final vblank somewhere before
57
51
* cutting the clocks?
58
52
*/
59
53
mdelay (16 + 4 );
60
54
61
- for ( i = 0 ; i < config -> pwr_clk_cnt ; i ++ )
62
- clk_disable_unprepare (hdmi -> pwr_clks [ i ] );
55
+ if ( hdmi -> extp_clk )
56
+ clk_disable_unprepare (hdmi -> extp_clk );
63
57
64
58
ret = regulator_bulk_disable (config -> pwr_reg_cnt , hdmi -> pwr_regs );
65
59
if (ret )
@@ -438,7 +432,6 @@ static enum drm_mode_status msm_hdmi_bridge_tmds_char_rate_valid(const struct dr
438
432
{
439
433
struct hdmi_bridge * hdmi_bridge = to_hdmi_bridge (bridge );
440
434
struct hdmi * hdmi = hdmi_bridge -> hdmi ;
441
- const struct hdmi_platform_config * config = hdmi -> config ;
442
435
struct msm_drm_private * priv = bridge -> dev -> dev_private ;
443
436
struct msm_kms * kms = priv -> kms ;
444
437
long actual ;
@@ -451,8 +444,8 @@ static enum drm_mode_status msm_hdmi_bridge_tmds_char_rate_valid(const struct dr
451
444
actual = kms -> funcs -> round_pixclk (kms ,
452
445
tmds_rate ,
453
446
hdmi_bridge -> hdmi -> encoder );
454
- else if (config -> pwr_clk_cnt > 0 )
455
- actual = clk_round_rate (hdmi -> pwr_clks [ 0 ] , tmds_rate );
447
+ else if (hdmi -> extp_clk )
448
+ actual = clk_round_rate (hdmi -> extp_clk , tmds_rate );
456
449
else
457
450
actual = tmds_rate ;
458
451
0 commit comments