dsi.c (c73588c091684ea5cd7d77a4f1ce9a538a461ad6) | dsi.c (87d322e9d25667bba50e8bb52e54b48e0d18b0af) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2015, The Linux Foundation. All rights reserved. 4 */ 5 6#include "dsi.h" 7 8bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi) --- 218 unchanged lines hidden (view full) --- 227 DBG(""); 228 msm_dsi_phy_driver_unregister(); 229 platform_driver_unregister(&dsi_driver); 230} 231 232int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, 233 struct drm_encoder *encoder) 234{ | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2015, The Linux Foundation. All rights reserved. 4 */ 5 6#include "dsi.h" 7 8bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi) --- 218 unchanged lines hidden (view full) --- 227 DBG(""); 228 msm_dsi_phy_driver_unregister(); 229 platform_driver_unregister(&dsi_driver); 230} 231 232int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, 233 struct drm_encoder *encoder) 234{ |
235 struct drm_bridge *bridge; | |
236 int ret; 237 238 msm_dsi->dev = dev; 239 240 ret = msm_dsi_host_modeset_init(msm_dsi->host, dev); 241 if (ret) { 242 DRM_DEV_ERROR(dev->dev, "failed to modeset init host: %d\n", ret); 243 return ret; 244 } 245 246 if (msm_dsi_is_bonded_dsi(msm_dsi) && 247 !msm_dsi_is_master_dsi(msm_dsi)) { 248 /* 249 * Do not return an eror here, 250 * Just skip creating encoder/connector for the slave-DSI. 251 */ 252 return 0; 253 } 254 | 235 int ret; 236 237 msm_dsi->dev = dev; 238 239 ret = msm_dsi_host_modeset_init(msm_dsi->host, dev); 240 if (ret) { 241 DRM_DEV_ERROR(dev->dev, "failed to modeset init host: %d\n", ret); 242 return ret; 243 } 244 245 if (msm_dsi_is_bonded_dsi(msm_dsi) && 246 !msm_dsi_is_master_dsi(msm_dsi)) { 247 /* 248 * Do not return an eror here, 249 * Just skip creating encoder/connector for the slave-DSI. 250 */ 251 return 0; 252 } 253 |
255 bridge = msm_dsi_manager_bridge_init(msm_dsi, encoder); 256 if (IS_ERR(bridge)) { 257 ret = PTR_ERR(bridge); 258 DRM_DEV_ERROR(dev->dev, "failed to create dsi bridge: %d\n", ret); 259 return ret; 260 } 261 262 ret = msm_dsi_manager_ext_bridge_init(msm_dsi->id, bridge); | 254 ret = msm_dsi_manager_connector_init(msm_dsi, encoder); |
263 if (ret) { 264 DRM_DEV_ERROR(dev->dev, 265 "failed to create dsi connector: %d\n", ret); 266 return ret; 267 } 268 269 return 0; 270} 271 272void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi) 273{ 274 msm_dsi_host_snapshot(disp_state, msm_dsi->host); 275 msm_dsi_phy_snapshot(disp_state, msm_dsi->phy); 276} 277 | 255 if (ret) { 256 DRM_DEV_ERROR(dev->dev, 257 "failed to create dsi connector: %d\n", ret); 258 return ret; 259 } 260 261 return 0; 262} 263 264void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi) 265{ 266 msm_dsi_host_snapshot(disp_state, msm_dsi->host); 267 msm_dsi_phy_snapshot(disp_state, msm_dsi->phy); 268} 269 |