Lines Matching +full:vm +full:- +full:map
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com/
22 /* The encoder and connector both map to same dssdev.. the encoder
24 * of the hw, and the connector handles the 'read-only' parts, like
44 static void omap_encoder_update_videomode_flags(struct videomode *vm, in omap_encoder_update_videomode_flags() argument
47 if (!(vm->flags & (DISPLAY_FLAGS_DE_LOW | in omap_encoder_update_videomode_flags()
50 vm->flags |= DISPLAY_FLAGS_DE_LOW; in omap_encoder_update_videomode_flags()
52 vm->flags |= DISPLAY_FLAGS_DE_HIGH; in omap_encoder_update_videomode_flags()
55 if (!(vm->flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE | in omap_encoder_update_videomode_flags()
58 vm->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE; in omap_encoder_update_videomode_flags()
60 vm->flags |= DISPLAY_FLAGS_PIXDATA_NEGEDGE; in omap_encoder_update_videomode_flags()
63 if (!(vm->flags & (DISPLAY_FLAGS_SYNC_POSEDGE | in omap_encoder_update_videomode_flags()
66 vm->flags |= DISPLAY_FLAGS_SYNC_POSEDGE; in omap_encoder_update_videomode_flags()
68 vm->flags |= DISPLAY_FLAGS_SYNC_NEGEDGE; in omap_encoder_update_videomode_flags()
77 struct omap_dss_device *output = omap_encoder->output; in omap_encoder_mode_set()
78 struct drm_device *dev = encoder->dev; in omap_encoder_mode_set()
81 struct videomode vm = { 0 }; in omap_encoder_mode_set() local
84 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in omap_encoder_mode_set()
85 if (connector->encoder == encoder) in omap_encoder_mode_set()
89 drm_display_mode_to_videomode(adjusted_mode, &vm); in omap_encoder_mode_set()
92 * HACK: This fixes the vm flags. in omap_encoder_mode_set()
98 * A better solution is to use DRM's bus-flags through the whole driver. in omap_encoder_mode_set()
100 for (bridge = output->bridge; bridge; in omap_encoder_mode_set()
102 if (!bridge->timings) in omap_encoder_mode_set()
105 bus_flags = bridge->timings->input_bus_flags; in omap_encoder_mode_set()
106 omap_encoder_update_videomode_flags(&vm, bus_flags); in omap_encoder_mode_set()
109 bus_flags = connector->display_info.bus_flags; in omap_encoder_mode_set()
110 omap_encoder_update_videomode_flags(&vm, bus_flags); in omap_encoder_mode_set()
113 dss_mgr_set_timings(output, &vm); in omap_encoder_mode_set()
131 omap_encoder->output = output; in omap_encoder_init()
133 encoder = &omap_encoder->base; in omap_encoder_init()