File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,19 @@ static const struct drm_encoder_funcs ast_astdp_encoder_funcs = {
300
300
.destroy = drm_encoder_cleanup ,
301
301
};
302
302
303
+ static enum drm_mode_status
304
+ ast_astdp_encoder_helper_mode_valid (struct drm_encoder * encoder ,
305
+ const struct drm_display_mode * mode )
306
+ {
307
+ int res ;
308
+
309
+ res = ast_astdp_get_mode_index (mode -> hdisplay , mode -> vdisplay );
310
+ if (res < 0 )
311
+ return MODE_NOMODE ;
312
+
313
+ return MODE_OK ;
314
+ }
315
+
303
316
static void ast_astdp_encoder_helper_atomic_mode_set (struct drm_encoder * encoder ,
304
317
struct drm_crtc_state * crtc_state ,
305
318
struct drm_connector_state * conn_state )
@@ -389,6 +402,7 @@ static int ast_astdp_encoder_helper_atomic_check(struct drm_encoder *encoder,
389
402
}
390
403
391
404
static const struct drm_encoder_helper_funcs ast_astdp_encoder_helper_funcs = {
405
+ .mode_valid = ast_astdp_encoder_helper_mode_valid ,
392
406
.atomic_mode_set = ast_astdp_encoder_helper_atomic_mode_set ,
393
407
.atomic_enable = ast_astdp_encoder_helper_atomic_enable ,
394
408
.atomic_disable = ast_astdp_encoder_helper_atomic_disable ,
You can’t perform that action at this time.
0 commit comments