diff options
| -rw-r--r-- | drivers/gpu/drm/tegra/rgb.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tegra/rgb.c b/drivers/gpu/drm/tegra/rgb.c index ba47ca4fb880..3b29018913a5 100644 --- a/drivers/gpu/drm/tegra/rgb.c +++ b/drivers/gpu/drm/tegra/rgb.c | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | 14 | ||
| 15 | struct tegra_rgb { | 15 | struct tegra_rgb { |
| 16 | struct tegra_output output; | 16 | struct tegra_output output; |
| 17 | struct tegra_dc *dc; | ||
| 18 | |||
| 17 | struct clk *clk_parent; | 19 | struct clk *clk_parent; |
| 18 | struct clk *clk; | 20 | struct clk *clk; |
| 19 | }; | 21 | }; |
| @@ -84,18 +86,18 @@ static void tegra_dc_write_regs(struct tegra_dc *dc, | |||
| 84 | 86 | ||
| 85 | static int tegra_output_rgb_enable(struct tegra_output *output) | 87 | static int tegra_output_rgb_enable(struct tegra_output *output) |
| 86 | { | 88 | { |
| 87 | struct tegra_dc *dc = to_tegra_dc(output->encoder.crtc); | 89 | struct tegra_rgb *rgb = to_rgb(output); |
| 88 | 90 | ||
| 89 | tegra_dc_write_regs(dc, rgb_enable, ARRAY_SIZE(rgb_enable)); | 91 | tegra_dc_write_regs(rgb->dc, rgb_enable, ARRAY_SIZE(rgb_enable)); |
| 90 | 92 | ||
| 91 | return 0; | 93 | return 0; |
| 92 | } | 94 | } |
| 93 | 95 | ||
| 94 | static int tegra_output_rgb_disable(struct tegra_output *output) | 96 | static int tegra_output_rgb_disable(struct tegra_output *output) |
| 95 | { | 97 | { |
| 96 | struct tegra_dc *dc = to_tegra_dc(output->encoder.crtc); | 98 | struct tegra_rgb *rgb = to_rgb(output); |
| 97 | 99 | ||
| 98 | tegra_dc_write_regs(dc, rgb_disable, ARRAY_SIZE(rgb_disable)); | 100 | tegra_dc_write_regs(rgb->dc, rgb_disable, ARRAY_SIZE(rgb_disable)); |
| 99 | 101 | ||
| 100 | return 0; | 102 | return 0; |
| 101 | } | 103 | } |
| @@ -146,6 +148,7 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc) | |||
| 146 | 148 | ||
| 147 | rgb->output.dev = dc->dev; | 149 | rgb->output.dev = dc->dev; |
| 148 | rgb->output.of_node = np; | 150 | rgb->output.of_node = np; |
| 151 | rgb->dc = dc; | ||
| 149 | 152 | ||
| 150 | err = tegra_output_probe(&rgb->output); | 153 | err = tegra_output_probe(&rgb->output); |
| 151 | if (err < 0) | 154 | if (err < 0) |
