Lines Matching refs:pPriv
70 I830ResetVideo(VADriverContextP ctx, PsbPortPrivPtr pPriv) in I830ResetVideo() argument
73 I830OverlayRegPtr overlayA = (I830OverlayRegPtr)(pPriv->regmap[0]); in I830ResetVideo()
74 I830OverlayRegPtr overlayC = (I830OverlayRegPtr)(pPriv->regmap[1]); in I830ResetVideo()
79 overlayA->OCLRC0 = (pPriv->contrast.Value << 18) | (pPriv->brightness.Value & 0xff); in I830ResetVideo()
80 overlayA->OCLRC1 = pPriv->saturation.Value; in I830ResetVideo()
82 overlayC->OCLRC0 = (pPriv->contrast.Value << 18) | (pPriv->brightness.Value & 0xff); in I830ResetVideo()
83 overlayC->OCLRC1 = pPriv->saturation.Value; in I830ResetVideo()
87 overlayA->DCLRKV = pPriv->colorKey; in I830ResetVideo()
91 overlayC->DCLRKV = pPriv->colorKey; in I830ResetVideo()
125 I830UpdateGamma(VADriverContextP ctx, PsbPortPrivPtr pPriv) in I830UpdateGamma() argument
129 uint32_t gamma0 = pPriv->gamma0; in I830UpdateGamma()
130 uint32_t gamma1 = pPriv->gamma1; in I830UpdateGamma()
131 uint32_t gamma2 = pPriv->gamma2; in I830UpdateGamma()
132 uint32_t gamma3 = pPriv->gamma3; in I830UpdateGamma()
133 uint32_t gamma4 = pPriv->gamma4; in I830UpdateGamma()
134 uint32_t gamma5 = pPriv->gamma5; in I830UpdateGamma()
144 if (pPriv->is_mfld) in I830UpdateGamma()
162 PsbPortPrivPtr pPriv = (PsbPortPrivPtr)(&driver_data->coverlay_priv); in I830StopVideo() local
166 if (!pPriv->overlayA_enabled && !pPriv->overlayC_enabled) { in I830StopVideo()
171 overlayA = (I830OverlayRegPtr)(pPriv->regmap[0]); in I830StopVideo()
172 overlayC = (I830OverlayRegPtr)(pPriv->regmap[1]); in I830StopVideo()
174 REGION_EMPTY(pScrn->pScreen, &pPriv->clip); in I830StopVideo()
177 if (pPriv->subpicture_enabled) { in I830StopVideo()
178 regs.subpicture_disable_mask = pPriv->subpicture_enable_mask; in I830StopVideo()
179 pPriv->subpicture_enabled = 0; in I830StopVideo()
185 if (pPriv->is_mfld && psb_xrandr_single_mode() == 0) { in I830StopVideo()
186 if (pPriv->overlayC_enabled) { in I830StopVideo()
198 pPriv->overlayC_enabled = 0; in I830StopVideo()
200 if (pPriv->overlayA_enabled) { in I830StopVideo()
210 pPriv->overlayA_enabled = 0; in I830StopVideo()
222 pPriv->overlayA_enabled = 0; in I830StopVideo()
231 PsbPortPrivPtr pPriv = (PsbPortPrivPtr)(&driver_data->coverlay_priv);
232 I830OverlayRegPtr overlay = (I830OverlayRegPtr)(pPriv->regmap[overlayId]);
236 if ((overlayId == OVERLAY_A) && pPriv->overlayA_enabled)
238 else if ((overlayId == OVERLAY_C) && pPriv->overlayC_enabled)
246 overlay->OCLRC0 = (pPriv->contrast.Value << 18) | (pPriv->brightness.Value & 0xff);
247 overlay->OCLRC1 = pPriv->saturation.Value;
250 overlay->DCLRKV = pPriv->colorKey;
412 VADriverContextP ctx, PsbPortPrivPtr pPriv, VASurfaceID __maybe_unused surface, in i830_display_video() argument
425 unsigned int offset = wsbmBOOffsetHint(pPriv->wsbo[overlayId]) & 0x0FFFFFFF; in i830_display_video()
426 I830OverlayRegPtr overlay = (I830OverlayRegPtr)(pPriv->regmap[overlayId]); in i830_display_video()
432 if ((overlayId == OVERLAY_A) && !pPriv->overlayA_enabled) { in i830_display_video()
460 if (pPriv->subpicture_enabled) in i830_display_video()
464 overlay->DCLRKV = pPriv->colorKey; in i830_display_video()
476 switch (pPriv->rotation) { in i830_display_video()
482 dstBox->y1 = pPriv->height_save - tmp; in i830_display_video()
485 dstBox->y2 = pPriv->height_save - tmp; in i830_display_video()
495 dstBox->x1 = pPriv->width_save - dstBox->x2; in i830_display_video()
496 dstBox->x2 = pPriv->width_save - tmp; in i830_display_video()
498 dstBox->y1 = pPriv->height_save - dstBox->y2; in i830_display_video()
499 dstBox->y2 = pPriv->height_save - tmp; in i830_display_video()
503 dstBox->x1 = pPriv->width_save - dstBox->y1; in i830_display_video()
506 dstBox->x2 = pPriv->width_save - dstBox->y2; in i830_display_video()
519 if (pPriv->oneLineMode) { in i830_display_video()
521 dstBox->y1 = (((dstBox->y1 - 1) * pPriv->scaleRatio) >> 16) + 1; in i830_display_video()
522 dstBox->y2 = ((dstBox->y2 * pPriv->scaleRatio) >> 16) + 1; in i830_display_video()
525 drw_h = ((drw_h * pPriv->scaleRatio) >> 16) + 1; in i830_display_video()
531 if (pPriv->curBuf == 0) { in i830_display_video()
532 offsety = pPriv->YBuf0offset; in i830_display_video()
533 offsetu = pPriv->UBuf0offset; in i830_display_video()
535 offsety = pPriv->YBuf1offset; in i830_display_video()
536 offsetu = pPriv->UBuf1offset; in i830_display_video()
577 overlay->OBUF_0Y = pPriv->YBuf0offset; in i830_display_video()
578 overlay->OBUF_0U = pPriv->UBuf0offset; in i830_display_video()
579 overlay->OBUF_0V = pPriv->VBuf0offset; in i830_display_video()
580 overlay->OBUF_1Y = pPriv->YBuf1offset; in i830_display_video()
581 overlay->OBUF_1U = pPriv->UBuf1offset; in i830_display_video()
582 overlay->OBUF_1V = pPriv->VBuf1offset; in i830_display_video()
646 if (pPriv->is_mfld) in i830_display_video()
658 if (pPriv->is_mfld) in i830_display_video()
755 overlay->OBUF_0Y = pPriv->YBuf0offset - srcPitch; in i830_display_video()
756 overlay->OBUF_0U = pPriv->UBuf0offset - srcPitch; in i830_display_video()
757 overlay->OBUF_0V = pPriv->VBuf0offset - srcPitch; in i830_display_video()
758 overlay->OBUF_1Y = pPriv->YBuf1offset - srcPitch; in i830_display_video()
759 overlay->OBUF_1U = pPriv->UBuf1offset - srcPitch; in i830_display_video()
760 overlay->OBUF_1V = pPriv->VBuf1offset - srcPitch; in i830_display_video()
770 if (pPriv->curBuf == 0) in i830_display_video()
780 pPriv->overlayA_enabled = 1; in i830_display_video()
784 pPriv->overlayC_enabled = 1; in i830_display_video()
789 if (pPriv->is_mfld) { in i830_display_video()
800 regs.overlay.buffer_handle = wsbmKBufHandle(wsbmKBuf(pPriv->wsbo[overlayId])); in i830_display_video()
808 if (pPriv->is_mfld) { in i830_display_video()
834 if (pPriv->is_mfld) { in i830_display_video()
861 PsbPortPrivPtr pPriv; in I830PutImageFlipRotateSurface() local
868 pPriv = (PsbPortPrivPtr)(&driver_data->coverlay_priv); in I830PutImageFlipRotateSurface()
883 pPriv->width_save = pPriv->display_width; in I830PutImageFlipRotateSurface()
884 pPriv->height_save = pPriv->display_height; in I830PutImageFlipRotateSurface()
886 pPriv->width_save = pPriv->display_height; in I830PutImageFlipRotateSurface()
887 pPriv->height_save = pPriv->display_width; in I830PutImageFlipRotateSurface()
890 pPriv->rotation = driver_data->local_rotation; in I830PutImageFlipRotateSurface()
892 pPriv->rotation = 0; in I830PutImageFlipRotateSurface()
906 pPriv->width_save = pPriv->extend_display_width; in I830PutImageFlipRotateSurface()
907 pPriv->height_save = pPriv->extend_display_height; in I830PutImageFlipRotateSurface()
909 pPriv->width_save = pPriv->extend_display_height; in I830PutImageFlipRotateSurface()
910 pPriv->height_save = pPriv->extend_display_width; in I830PutImageFlipRotateSurface()
913 pPriv->rotation = driver_data->extend_rotation; in I830PutImageFlipRotateSurface()
915 pPriv->rotation = 0; in I830PutImageFlipRotateSurface()
1038 PsbPortPrivPtr pPriv; in I830PutImage() local
1046 pPriv = (PsbPortPrivPtr)(&driver_data->coverlay_priv); in I830PutImage()
1105 h_ratio = (float)pScrn->pScreen->height / pPriv->width_save; in I830PutImage()
1106 v_ratio = (float)pScrn->pScreen->width / pPriv->height_save; in I830PutImage()
1108 h_ratio = (float)pScrn->pScreen->width / pPriv->width_save; in I830PutImage()
1109 v_ratio = (float)pScrn->pScreen->height / pPriv->height_save; in I830PutImage()
1186 pPriv->YBuf0offset = pre_add + gtt_ofs + top * pitch2 + left; in I830PutImage()
1187 pPriv->YBuf1offset = pPriv->YBuf0offset; in I830PutImage()
1188 pPriv->UBuf0offset = pre_add + gtt_ofs + (pitch2 * height) + top * (pitch2 / 2) + left; in I830PutImage()
1189 pPriv->VBuf0offset = pPriv->UBuf0offset; in I830PutImage()
1190 pPriv->UBuf1offset = pPriv->UBuf0offset; in I830PutImage()
1191 pPriv->VBuf1offset = pPriv->UBuf0offset; in I830PutImage()
1196 if (pPriv->rotation & (RR_Rotate_90 | RR_Rotate_270)) { in I830PutImage()
1197 pPriv->UBuf0offset = pPriv->YBuf0offset + (pitch2 * width); in I830PutImage()
1198 pPriv->VBuf0offset = pPriv->UBuf0offset + (pitch2 * width / 2); in I830PutImage()
1199 pPriv->UBuf1offset = pPriv->YBuf1offset + (pitch2 * width); in I830PutImage()
1200 pPriv->VBuf1offset = pPriv->UBuf1offset + (pitch2 * width / 2); in I830PutImage()
1202 pPriv->UBuf0offset = pPriv->YBuf0offset + (pitch2 * height); in I830PutImage()
1203 pPriv->VBuf0offset = pPriv->UBuf0offset + (pitch2 * height / 2); in I830PutImage()
1204 pPriv->UBuf1offset = pPriv->YBuf1offset + (pitch2 * height); in I830PutImage()
1205 pPriv->VBuf1offset = pPriv->UBuf1offset + (pitch2 * height / 2); in I830PutImage()
1212 && (pPriv->rotation != RR_Rotate_0) \ in I830PutImage()
1218 i830_display_video(ctx, pPriv, surface, fourcc, src_w, src_h, pitch2, pitch, in I830PutImage()
1230 static void psbPortPrivCreate(PsbPortPrivPtr pPriv) in psbPortPrivCreate() argument
1233 REGION_NULL(pScreen, &pPriv->clip); in psbPortPrivCreate()
1237 pPriv->brightness.Value = OV_BRIGHTNESS_DEFAULT_VALUE; in psbPortPrivCreate()
1238 pPriv->brightness.Fraction = 0; in psbPortPrivCreate()
1240 pPriv->contrast.Value = OV_CONTRAST_DEFAULT_VALUE; in psbPortPrivCreate()
1241 pPriv->contrast.Fraction = 0; in psbPortPrivCreate()
1243 pPriv->hue.Value = OV_HUE_DEFAULT_VALUE; in psbPortPrivCreate()
1244 pPriv->hue.Fraction = 0; in psbPortPrivCreate()
1246 pPriv->saturation.Value = OV_SATURATION_DEFAULT_VALUE; in psbPortPrivCreate()
1247 pPriv->saturation.Fraction = 0; in psbPortPrivCreate()
1248 pPriv->subpicture_enabled = 0; in psbPortPrivCreate()
1249 pPriv->subpicture_enable_mask = 0; in psbPortPrivCreate()
1250 pPriv->overlayA_enabled = 0; in psbPortPrivCreate()
1251 pPriv->overlayC_enabled = 0; in psbPortPrivCreate()
1252 pPriv->overlayA_pipeId = PIPEA; in psbPortPrivCreate()
1253 pPriv->overlayC_pipeId = PIPEB; in psbPortPrivCreate()
1257 pPriv->width_save = 1024; in psbPortPrivCreate()
1258 pPriv->height_save = 600; in psbPortPrivCreate()
1263 psbPortPrivDestroy(VADriverContextP ctx, PsbPortPrivPtr pPriv) in psbPortPrivDestroy() argument
1267 wsbmBOUnmap(pPriv->wsbo[0]); in psbPortPrivDestroy()
1268 wsbmBOUnreference(&pPriv->wsbo[0]); in psbPortPrivDestroy()
1269 wsbmBOUnmap(pPriv->wsbo[1]); in psbPortPrivDestroy()
1270 wsbmBOUnreference(&pPriv->wsbo[1]); in psbPortPrivDestroy()
1271 if (pPriv->is_mfld) { in psbPortPrivDestroy()
1272 if (pPriv->p_iep_lite_context) in psbPortPrivDestroy()
1273 free(pPriv->p_iep_lite_context); in psbPortPrivDestroy()
1275 pPriv->p_iep_lite_context = NULL; in psbPortPrivDestroy()
1279 psbSetupImageVideoOverlay(VADriverContextP ctx, PsbPortPrivPtr pPriv) in psbSetupImageVideoOverlay() argument
1285 psbPortPrivCreate(pPriv); in psbSetupImageVideoOverlay()
1289 pPriv->colorKey = driver_data->color_key/*0x0440*/; in psbSetupImageVideoOverlay()
1293 pPriv->brightness.Value = 0; /*-19*/ in psbSetupImageVideoOverlay()
1294 pPriv->contrast.Value = 0x40; /*75*/ in psbSetupImageVideoOverlay()
1295 pPriv->saturation.Value = 0x80; /*146*/ in psbSetupImageVideoOverlay()
1297 pPriv->gamma5 = 0xc0c0c0; in psbSetupImageVideoOverlay()
1298 pPriv->gamma4 = 0x808080; in psbSetupImageVideoOverlay()
1299 pPriv->gamma3 = 0x404040; in psbSetupImageVideoOverlay()
1300 pPriv->gamma2 = 0x202020; in psbSetupImageVideoOverlay()
1301 pPriv->gamma1 = 0x101010; in psbSetupImageVideoOverlay()
1302 pPriv->gamma0 = 0x080808; in psbSetupImageVideoOverlay()
1304 pPriv->rotation = VA_ROTATION_NONE; in psbSetupImageVideoOverlay()
1305 pPriv->subpic_clear_flag = 1; in psbSetupImageVideoOverlay()
1308 REGION_NULL(pScreen, &pPriv->clip); in psbSetupImageVideoOverlay()
1315 pPriv->scaleRatio = 0x10000; in psbSetupImageVideoOverlay()
1316 pPriv->oneLineMode = FALSE; in psbSetupImageVideoOverlay()
1319 &pPriv->wsbo[0], 64 * 1024, /* 64k alignment */ in psbSetupImageVideoOverlay()
1324 ret = wsbmBOData(pPriv->wsbo[0], in psbSetupImageVideoOverlay()
1331 pPriv->regmap[0] = wsbmBOMap(pPriv->wsbo[0], WSBM_ACCESS_READ | WSBM_ACCESS_WRITE); in psbSetupImageVideoOverlay()
1332 if (!pPriv->regmap[0]) { in psbSetupImageVideoOverlay()
1336 ret = wsbmBOData(pPriv->wsbo[1], in psbSetupImageVideoOverlay()
1343 pPriv->regmap[1] = wsbmBOMap(pPriv->wsbo[1], WSBM_ACCESS_READ | WSBM_ACCESS_WRITE); in psbSetupImageVideoOverlay()
1344 if (!pPriv->regmap[1]) { in psbSetupImageVideoOverlay()
1348 overlayA = (I830OverlayRegPtr)(pPriv->regmap[0]); in psbSetupImageVideoOverlay()
1349 overlayC = (I830OverlayRegPtr)(pPriv->regmap[1]); in psbSetupImageVideoOverlay()
1351 if (pPriv->is_mfld) { in psbSetupImageVideoOverlay()
1365 wsbmBOUnreference(&pPriv->wsbo[1]); in psbSetupImageVideoOverlay()
1367 wsbmBOUnreference(&pPriv->wsbo[0]); in psbSetupImageVideoOverlay()
1377 PsbPortPrivPtr pPriv = &driver_data->coverlay_priv; in psb_coverlay_init() local
1381 memset(pPriv, 0, sizeof(PsbPortPrivRec)); in psb_coverlay_init()
1382 pPriv->is_mfld = (IS_MFLD(driver_data) || IS_MRFL(driver_data)); in psb_coverlay_init()
1384 ret = psbSetupImageVideoOverlay(ctx, pPriv); in psb_coverlay_init()
1390 if (pPriv->is_mfld && driver_data->is_android) { in psb_coverlay_init()
1401 I830ResetVideo(ctx, pPriv); in psb_coverlay_init()
1402 I830UpdateGamma(ctx, pPriv); in psb_coverlay_init()
1417 PsbPortPrivPtr pPriv = &driver_data->coverlay_priv; in psb_coverlay_deinit() local
1420 if (pPriv->is_mfld && driver_data->is_android) { in psb_coverlay_deinit()
1431 psbPortPrivDestroy(ctx, pPriv); in psb_coverlay_deinit()
1454 PsbPortPrivPtr pPriv = (PsbPortPrivPtr)(&driver_data->coverlay_priv); in psb_putsurface_overlay() local
1456 if ((overlayId == OVERLAY_A) && (pPriv->overlayA_pipeId != pipeId)) { in psb_putsurface_overlay()
1457 pPriv->overlayA_pipeId = pipeId; in psb_putsurface_overlay()
1460 } else if ((overlayId == OVERLAY_C) && (pPriv->overlayC_pipeId != pipeId)) { in psb_putsurface_overlay()
1461 pPriv->overlayC_pipeId = pipeId; in psb_putsurface_overlay()