| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2013 Red Hat |
|---|
| 3 | 4 | * Author: Rob Clark <robdclark@gmail.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms of the GNU General Public License version 2 as published by |
|---|
| 7 | | - * the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 12 | | - * more details. |
|---|
| 13 | | - * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 15 | | - * this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 16 | 5 | */ |
|---|
| 6 | + |
|---|
| 7 | +#include <linux/delay.h> |
|---|
| 17 | 8 | |
|---|
| 18 | 9 | #include "hdmi.h" |
|---|
| 19 | 10 | |
|---|
| .. | .. |
|---|
| 40 | 31 | for (i = 0; i < config->pwr_reg_cnt; i++) { |
|---|
| 41 | 32 | ret = regulator_enable(hdmi->pwr_regs[i]); |
|---|
| 42 | 33 | if (ret) { |
|---|
| 43 | | - dev_err(dev->dev, "failed to enable pwr regulator: %s (%d)\n", |
|---|
| 34 | + DRM_DEV_ERROR(dev->dev, "failed to enable pwr regulator: %s (%d)\n", |
|---|
| 44 | 35 | config->pwr_reg_names[i], ret); |
|---|
| 45 | 36 | } |
|---|
| 46 | 37 | } |
|---|
| .. | .. |
|---|
| 49 | 40 | DBG("pixclock: %lu", hdmi->pixclock); |
|---|
| 50 | 41 | ret = clk_set_rate(hdmi->pwr_clks[0], hdmi->pixclock); |
|---|
| 51 | 42 | if (ret) { |
|---|
| 52 | | - dev_err(dev->dev, "failed to set pixel clk: %s (%d)\n", |
|---|
| 43 | + DRM_DEV_ERROR(dev->dev, "failed to set pixel clk: %s (%d)\n", |
|---|
| 53 | 44 | config->pwr_clk_names[0], ret); |
|---|
| 54 | 45 | } |
|---|
| 55 | 46 | } |
|---|
| .. | .. |
|---|
| 57 | 48 | for (i = 0; i < config->pwr_clk_cnt; i++) { |
|---|
| 58 | 49 | ret = clk_prepare_enable(hdmi->pwr_clks[i]); |
|---|
| 59 | 50 | if (ret) { |
|---|
| 60 | | - dev_err(dev->dev, "failed to enable pwr clk: %s (%d)\n", |
|---|
| 51 | + DRM_DEV_ERROR(dev->dev, "failed to enable pwr clk: %s (%d)\n", |
|---|
| 61 | 52 | config->pwr_clk_names[i], ret); |
|---|
| 62 | 53 | } |
|---|
| 63 | 54 | } |
|---|
| .. | .. |
|---|
| 82 | 73 | for (i = 0; i < config->pwr_reg_cnt; i++) { |
|---|
| 83 | 74 | ret = regulator_disable(hdmi->pwr_regs[i]); |
|---|
| 84 | 75 | if (ret) { |
|---|
| 85 | | - dev_err(dev->dev, "failed to disable pwr regulator: %s (%d)\n", |
|---|
| 76 | + DRM_DEV_ERROR(dev->dev, "failed to disable pwr regulator: %s (%d)\n", |
|---|
| 86 | 77 | config->pwr_reg_names[i], ret); |
|---|
| 87 | 78 | } |
|---|
| 88 | 79 | } |
|---|
| .. | .. |
|---|
| 101 | 92 | u32 val; |
|---|
| 102 | 93 | int len; |
|---|
| 103 | 94 | |
|---|
| 104 | | - drm_hdmi_avi_infoframe_from_display_mode(&frame.avi, mode, false); |
|---|
| 95 | + drm_hdmi_avi_infoframe_from_display_mode(&frame.avi, |
|---|
| 96 | + hdmi->connector, mode); |
|---|
| 105 | 97 | |
|---|
| 106 | 98 | len = hdmi_infoframe_pack(&frame, buffer, sizeof(buffer)); |
|---|
| 107 | 99 | if (len < 0) { |
|---|
| 108 | | - dev_err(&hdmi->pdev->dev, |
|---|
| 100 | + DRM_DEV_ERROR(&hdmi->pdev->dev, |
|---|
| 109 | 101 | "failed to configure avi infoframe\n"); |
|---|
| 110 | 102 | return; |
|---|
| 111 | 103 | } |
|---|
| .. | .. |
|---|
| 207 | 199 | } |
|---|
| 208 | 200 | |
|---|
| 209 | 201 | static void msm_hdmi_bridge_mode_set(struct drm_bridge *bridge, |
|---|
| 210 | | - struct drm_display_mode *mode, |
|---|
| 211 | | - struct drm_display_mode *adjusted_mode) |
|---|
| 202 | + const struct drm_display_mode *mode, |
|---|
| 203 | + const struct drm_display_mode *adjusted_mode) |
|---|
| 212 | 204 | { |
|---|
| 213 | 205 | struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); |
|---|
| 214 | 206 | struct hdmi *hdmi = hdmi_bridge->hdmi; |
|---|
| .. | .. |
|---|
| 295 | 287 | bridge = &hdmi_bridge->base; |
|---|
| 296 | 288 | bridge->funcs = &msm_hdmi_bridge_funcs; |
|---|
| 297 | 289 | |
|---|
| 298 | | - ret = drm_bridge_attach(hdmi->encoder, bridge, NULL); |
|---|
| 290 | + ret = drm_bridge_attach(hdmi->encoder, bridge, NULL, 0); |
|---|
| 299 | 291 | if (ret) |
|---|
| 300 | 292 | goto fail; |
|---|
| 301 | 293 | |
|---|