sync with OpenBSD -current
This commit is contained in:
parent
c8d0379fc6
commit
2b1f2f8516
9 changed files with 71 additions and 42 deletions
|
@ -206,28 +206,32 @@ void dcn21_set_abm_immediate_disable(struct pipe_ctx *pipe_ctx)
|
|||
void dcn21_set_pipe(struct pipe_ctx *pipe_ctx)
|
||||
{
|
||||
struct abm *abm = pipe_ctx->stream_res.abm;
|
||||
uint32_t otg_inst = pipe_ctx->stream_res.tg->inst;
|
||||
struct timing_generator *tg = pipe_ctx->stream_res.tg;
|
||||
struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
|
||||
struct dmcu *dmcu = pipe_ctx->stream->ctx->dc->res_pool->dmcu;
|
||||
uint32_t otg_inst;
|
||||
|
||||
if (!abm && !tg && !panel_cntl)
|
||||
return;
|
||||
|
||||
otg_inst = tg->inst;
|
||||
|
||||
if (dmcu) {
|
||||
dce110_set_pipe(pipe_ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
if (abm && panel_cntl) {
|
||||
if (abm->funcs && abm->funcs->set_pipe_ex) {
|
||||
abm->funcs->set_pipe_ex(abm,
|
||||
if (abm->funcs && abm->funcs->set_pipe_ex) {
|
||||
abm->funcs->set_pipe_ex(abm,
|
||||
otg_inst,
|
||||
SET_ABM_PIPE_NORMAL,
|
||||
panel_cntl->inst,
|
||||
panel_cntl->pwrseq_inst);
|
||||
} else {
|
||||
dmub_abm_set_pipe(abm, otg_inst,
|
||||
SET_ABM_PIPE_NORMAL,
|
||||
panel_cntl->inst,
|
||||
panel_cntl->pwrseq_inst);
|
||||
}
|
||||
} else {
|
||||
dmub_abm_set_pipe(abm, otg_inst,
|
||||
SET_ABM_PIPE_NORMAL,
|
||||
panel_cntl->inst,
|
||||
panel_cntl->pwrseq_inst);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,34 +241,35 @@ bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx,
|
|||
{
|
||||
struct dc_context *dc = pipe_ctx->stream->ctx;
|
||||
struct abm *abm = pipe_ctx->stream_res.abm;
|
||||
struct timing_generator *tg = pipe_ctx->stream_res.tg;
|
||||
struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
|
||||
uint32_t otg_inst;
|
||||
|
||||
if (!abm && !tg && !panel_cntl)
|
||||
return false;
|
||||
|
||||
otg_inst = tg->inst;
|
||||
|
||||
if (dc->dc->res_pool->dmcu) {
|
||||
dce110_set_backlight_level(pipe_ctx, backlight_pwm_u16_16, frame_ramp);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (abm != NULL) {
|
||||
uint32_t otg_inst = pipe_ctx->stream_res.tg->inst;
|
||||
|
||||
if (abm && panel_cntl) {
|
||||
if (abm->funcs && abm->funcs->set_pipe_ex) {
|
||||
abm->funcs->set_pipe_ex(abm,
|
||||
otg_inst,
|
||||
SET_ABM_PIPE_NORMAL,
|
||||
panel_cntl->inst,
|
||||
panel_cntl->pwrseq_inst);
|
||||
} else {
|
||||
dmub_abm_set_pipe(abm,
|
||||
otg_inst,
|
||||
SET_ABM_PIPE_NORMAL,
|
||||
panel_cntl->inst,
|
||||
panel_cntl->pwrseq_inst);
|
||||
}
|
||||
}
|
||||
if (abm->funcs && abm->funcs->set_pipe_ex) {
|
||||
abm->funcs->set_pipe_ex(abm,
|
||||
otg_inst,
|
||||
SET_ABM_PIPE_NORMAL,
|
||||
panel_cntl->inst,
|
||||
panel_cntl->pwrseq_inst);
|
||||
} else {
|
||||
dmub_abm_set_pipe(abm,
|
||||
otg_inst,
|
||||
SET_ABM_PIPE_NORMAL,
|
||||
panel_cntl->inst,
|
||||
panel_cntl->pwrseq_inst);
|
||||
}
|
||||
|
||||
if (abm && abm->funcs && abm->funcs->set_backlight_level_pwm)
|
||||
if (abm->funcs && abm->funcs->set_backlight_level_pwm)
|
||||
abm->funcs->set_backlight_level_pwm(abm, backlight_pwm_u16_16,
|
||||
frame_ramp, 0, panel_cntl->inst);
|
||||
else
|
||||
|
|
|
@ -996,7 +996,7 @@ static struct stream_encoder *dcn301_stream_encoder_create(enum engine_id eng_id
|
|||
vpg = dcn301_vpg_create(ctx, vpg_inst);
|
||||
afmt = dcn301_afmt_create(ctx, afmt_inst);
|
||||
|
||||
if (!enc1 || !vpg || !afmt) {
|
||||
if (!enc1 || !vpg || !afmt || eng_id >= ARRAY_SIZE(stream_enc_regs)) {
|
||||
kfree(enc1);
|
||||
kfree(vpg);
|
||||
kfree(afmt);
|
||||
|
|
|
@ -2850,8 +2850,7 @@ static int handle_mmio(struct intel_gvt_mmio_table_iter *iter, u32 offset,
|
|||
for (i = start; i < end; i += 4) {
|
||||
p = intel_gvt_find_mmio_info(gvt, i);
|
||||
if (p) {
|
||||
WARN(1, "dup mmio definition offset %x\n",
|
||||
info->offset);
|
||||
WARN(1, "dup mmio definition offset %x\n", i);
|
||||
|
||||
/* We return -EEXIST here to make GVT-g load fail.
|
||||
* So duplicated MMIO can be found as soon as
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue