@ -166,10 +166,9 @@ static int shd_display_init_base_crtc(struct drm_device *dev,
struct shd_display_base * base )
struct shd_display_base * base )
{
{
struct drm_crtc * crtc = NULL ;
struct drm_crtc * crtc = NULL ;
struct drm_display_mode * drm_mode ;
struct msm_drm_private * priv ;
struct msm_drm_private * priv ;
int crtc_idx ;
int crtc_idx ;
int rc = 0 , i ;
int i ;
priv = dev - > dev_private ;
priv = dev - > dev_private ;
@ -194,19 +193,7 @@ static int shd_display_init_base_crtc(struct drm_device *dev,
base - > crtc = crtc ;
base - > crtc = crtc ;
SDE_DEBUG ( " found base crtc %d \n " , crtc - > base . id ) ;
SDE_DEBUG ( " found base crtc %d \n " , crtc - > base . id ) ;
/* fixed mode is used */
return 0 ;
drm_mode = & base - > mode ;
/* update crtc drm structure */
rc = drm_atomic_set_mode_for_crtc ( crtc - > state , drm_mode ) ;
if ( rc ) {
SDE_ERROR ( " Failed: set mode for crtc. rc = %d \n " , rc ) ;
return rc ;
}
drm_mode_copy ( & crtc - > state - > adjusted_mode , drm_mode ) ;
drm_mode_copy ( & crtc - > mode , drm_mode ) ;
return rc ;
}
}
static void shd_display_setup_base_mixer_out ( struct shd_display_base * base )
static void shd_display_setup_base_mixer_out ( struct shd_display_base * base )
@ -275,6 +262,10 @@ static void shd_display_enable_base(struct drm_device *dev,
conn_state - > best_encoder = base - > encoder ;
conn_state - > best_encoder = base - > encoder ;
connector - > encoder = base - > encoder ;
connector - > encoder = base - > encoder ;
drm_atomic_set_mode_for_crtc ( crtc_state , & base - > mode ) ;
drm_mode_copy ( & crtc_state - > adjusted_mode , & base - > mode ) ;
drm_mode_copy ( & base - > crtc - > mode , & base - > mode ) ;
if ( conn_funcs - > atomic_best_encoder ) {
if ( conn_funcs - > atomic_best_encoder ) {
conn_funcs - > atomic_best_encoder ( base - > connector ,
conn_funcs - > atomic_best_encoder ( base - > connector ,
conn_state ) ;
conn_state ) ;