Lines Matching refs:tvenc
151 struct zx_tvenc *tvenc = to_zx_tvenc(encoder); in zx_tvenc_encoder_mode_set() local
163 DRM_DEV_ERROR(tvenc->dev, "failed to find zmode\n"); in zx_tvenc_encoder_mode_set()
167 zx_writel(tvenc->mmio + VENC_VIDEO_INFO, zmode->video_info); in zx_tvenc_encoder_mode_set()
168 zx_writel(tvenc->mmio + VENC_VIDEO_RES, zmode->video_res); in zx_tvenc_encoder_mode_set()
169 zx_writel(tvenc->mmio + VENC_FIELD1_PARAM, zmode->field1_param); in zx_tvenc_encoder_mode_set()
170 zx_writel(tvenc->mmio + VENC_FIELD2_PARAM, zmode->field2_param); in zx_tvenc_encoder_mode_set()
171 zx_writel(tvenc->mmio + VENC_LINE_O_1, zmode->burst_line_odd1); in zx_tvenc_encoder_mode_set()
172 zx_writel(tvenc->mmio + VENC_LINE_E_1, zmode->burst_line_even1); in zx_tvenc_encoder_mode_set()
173 zx_writel(tvenc->mmio + VENC_LINE_O_2, zmode->burst_line_odd2); in zx_tvenc_encoder_mode_set()
174 zx_writel(tvenc->mmio + VENC_LINE_E_2, zmode->burst_line_even2); in zx_tvenc_encoder_mode_set()
175 zx_writel(tvenc->mmio + VENC_LINE_TIMING_PARAM, in zx_tvenc_encoder_mode_set()
177 zx_writel(tvenc->mmio + VENC_WEIGHT_VALUE, zmode->weight_value); in zx_tvenc_encoder_mode_set()
178 zx_writel(tvenc->mmio + VENC_BLANK_BLACK_LEVEL, in zx_tvenc_encoder_mode_set()
180 zx_writel(tvenc->mmio + VENC_BURST_LEVEL, zmode->burst_level); in zx_tvenc_encoder_mode_set()
181 zx_writel(tvenc->mmio + VENC_CONTROL_PARAM, zmode->control_param); in zx_tvenc_encoder_mode_set()
182 zx_writel(tvenc->mmio + VENC_SUB_CARRIER_PHASE1, in zx_tvenc_encoder_mode_set()
184 zx_writel(tvenc->mmio + VENC_PHASE_LINE_INCR_CVBS, in zx_tvenc_encoder_mode_set()
190 struct zx_tvenc *tvenc = to_zx_tvenc(encoder); in zx_tvenc_encoder_enable() local
191 struct zx_tvenc_pwrctrl *pwrctrl = &tvenc->pwrctrl; in zx_tvenc_encoder_enable()
199 zx_writel(tvenc->mmio + VENC_ENABLE, 1); in zx_tvenc_encoder_enable()
204 struct zx_tvenc *tvenc = to_zx_tvenc(encoder); in zx_tvenc_encoder_disable() local
205 struct zx_tvenc_pwrctrl *pwrctrl = &tvenc->pwrctrl; in zx_tvenc_encoder_disable()
207 zx_writel(tvenc->mmio + VENC_ENABLE, 0); in zx_tvenc_encoder_disable()
227 struct zx_tvenc *tvenc = to_zx_tvenc(connector); in zx_tvenc_connector_get_modes() local
228 struct device *dev = tvenc->dev; in zx_tvenc_connector_get_modes()
252 struct zx_tvenc *tvenc = to_zx_tvenc(connector); in zx_tvenc_connector_mode_valid() local
257 DRM_DEV_ERROR(tvenc->dev, "unsupported mode: %s\n", mode->name); in zx_tvenc_connector_mode_valid()
277 static int zx_tvenc_register(struct drm_device *drm, struct zx_tvenc *tvenc) in zx_tvenc_register() argument
279 struct drm_encoder *encoder = &tvenc->encoder; in zx_tvenc_register()
280 struct drm_connector *connector = &tvenc->connector; in zx_tvenc_register()
303 static int zx_tvenc_pwrctrl_init(struct zx_tvenc *tvenc) in zx_tvenc_pwrctrl_init() argument
305 struct zx_tvenc_pwrctrl *pwrctrl = &tvenc->pwrctrl; in zx_tvenc_pwrctrl_init()
306 struct device *dev = tvenc->dev; in zx_tvenc_pwrctrl_init()
336 struct zx_tvenc *tvenc; in zx_tvenc_bind() local
339 tvenc = devm_kzalloc(dev, sizeof(*tvenc), GFP_KERNEL); in zx_tvenc_bind()
340 if (!tvenc) in zx_tvenc_bind()
343 tvenc->dev = dev; in zx_tvenc_bind()
344 dev_set_drvdata(dev, tvenc); in zx_tvenc_bind()
347 tvenc->mmio = devm_ioremap_resource(dev, res); in zx_tvenc_bind()
348 if (IS_ERR(tvenc->mmio)) { in zx_tvenc_bind()
349 ret = PTR_ERR(tvenc->mmio); in zx_tvenc_bind()
354 ret = zx_tvenc_pwrctrl_init(tvenc); in zx_tvenc_bind()
360 ret = zx_tvenc_register(drm, tvenc); in zx_tvenc_bind()