disp: msm: sde: get ctl scheduler status at each vsync
Get controller scheduler status at each vsync to verify pending frame status. Change-Id: I01401a57b68828294299977a7be7e796d07c7472 Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
@@ -254,13 +254,15 @@ static void sde_encoder_phys_cmd_te_rd_ptr_irq(void *arg, int irq_idx)
|
|||||||
{
|
{
|
||||||
struct sde_encoder_phys *phys_enc = arg;
|
struct sde_encoder_phys *phys_enc = arg;
|
||||||
struct sde_encoder_phys_cmd *cmd_enc;
|
struct sde_encoder_phys_cmd *cmd_enc;
|
||||||
u32 event = 0;
|
u32 event = 0, scheduler_status = INVALID_CTL_STATUS;
|
||||||
|
struct sde_hw_ctl *ctl;
|
||||||
|
|
||||||
if (!phys_enc || !phys_enc->hw_pp || !phys_enc->hw_intf)
|
if (!phys_enc || !phys_enc->hw_pp || !phys_enc->hw_intf)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SDE_ATRACE_BEGIN("rd_ptr_irq");
|
SDE_ATRACE_BEGIN("rd_ptr_irq");
|
||||||
cmd_enc = to_sde_encoder_phys_cmd(phys_enc);
|
cmd_enc = to_sde_encoder_phys_cmd(phys_enc);
|
||||||
|
ctl = phys_enc->hw_ctl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* signal only for master, when the ctl_start irq is
|
* signal only for master, when the ctl_start irq is
|
||||||
@@ -277,10 +279,13 @@ static void sde_encoder_phys_cmd_te_rd_ptr_irq(void *arg, int irq_idx)
|
|||||||
phys_enc->parent, phys_enc, event);
|
phys_enc->parent, phys_enc, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctl && ctl->ops.get_scheduler_status)
|
||||||
|
scheduler_status = ctl->ops.get_scheduler_status(ctl);
|
||||||
|
|
||||||
SDE_EVT32_IRQ(DRMID(phys_enc->parent),
|
SDE_EVT32_IRQ(DRMID(phys_enc->parent),
|
||||||
phys_enc->hw_pp->idx - PINGPONG_0,
|
phys_enc->hw_pp->idx - PINGPONG_0,
|
||||||
phys_enc->hw_intf->idx - INTF_0,
|
phys_enc->hw_intf->idx - INTF_0,
|
||||||
event, 0xfff);
|
event, scheduler_status, 0xfff);
|
||||||
|
|
||||||
if (phys_enc->parent_ops.handle_vblank_virt)
|
if (phys_enc->parent_ops.handle_vblank_virt)
|
||||||
phys_enc->parent_ops.handle_vblank_virt(phys_enc->parent,
|
phys_enc->parent_ops.handle_vblank_virt(phys_enc->parent,
|
||||||
|
@@ -691,7 +691,7 @@ static u32 sde_hw_ctl_get_reset_status(struct sde_hw_ctl *ctx)
|
|||||||
static u32 sde_hw_ctl_get_scheduler_status(struct sde_hw_ctl *ctx)
|
static u32 sde_hw_ctl_get_scheduler_status(struct sde_hw_ctl *ctx)
|
||||||
{
|
{
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
return 0;
|
return INVALID_CTL_STATUS;
|
||||||
return (u32)SDE_REG_READ(&ctx->hw, CTL_STATUS);
|
return (u32)SDE_REG_READ(&ctx->hw, CTL_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
#include "sde_hw_sspp.h"
|
#include "sde_hw_sspp.h"
|
||||||
#include "sde_hw_blk.h"
|
#include "sde_hw_blk.h"
|
||||||
|
|
||||||
|
#define INVALID_CTL_STATUS 0xfffff88e
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sde_ctl_mode_sel: Interface mode selection
|
* sde_ctl_mode_sel: Interface mode selection
|
||||||
* SDE_CTL_MODE_SEL_VID: Video mode interface
|
* SDE_CTL_MODE_SEL_VID: Video mode interface
|
||||||
|
Reference in New Issue
Block a user