Merge "disp: msm: sde: fix inline rotator downscale ratio check"
Dieser Commit ist enthalten in:

committet von
Gerrit - the friendly Code Review server

Commit
aa7c045206
@@ -456,7 +456,7 @@ static inline bool _sde_core_perf_is_wb(struct drm_crtc *crtc)
|
||||
{
|
||||
enum sde_intf_mode if_mode = INTF_MODE_NONE;
|
||||
|
||||
if_mode = sde_crtc_get_intf_mode(crtc);
|
||||
if_mode = sde_crtc_get_intf_mode(crtc, crtc->state);
|
||||
if (if_mode == INTF_MODE_WB_BLOCK ||
|
||||
if_mode == INTF_MODE_WB_LINE)
|
||||
return true;
|
||||
@@ -678,7 +678,7 @@ void sde_core_perf_crtc_release_bw(struct drm_crtc *crtc)
|
||||
sde_cstate = to_sde_crtc_state(crtc->state);
|
||||
|
||||
/* only do this for command mode rt client (non-rsc client) */
|
||||
if ((sde_crtc_get_intf_mode(crtc) != INTF_MODE_CMD) &&
|
||||
if ((sde_crtc_get_intf_mode(crtc, crtc->state) != INTF_MODE_CMD) &&
|
||||
(sde_crtc_get_client_type(crtc) != RT_RSC_CLIENT))
|
||||
return;
|
||||
|
||||
@@ -686,11 +686,11 @@ void sde_core_perf_crtc_release_bw(struct drm_crtc *crtc)
|
||||
* If video interface present, cmd panel bandwidth cannot be
|
||||
* released.
|
||||
*/
|
||||
if (sde_crtc_get_intf_mode(crtc) == INTF_MODE_CMD)
|
||||
if (sde_crtc_get_intf_mode(crtc, crtc->state) == INTF_MODE_CMD)
|
||||
drm_for_each_crtc(tmp_crtc, crtc->dev) {
|
||||
if (_sde_core_perf_crtc_is_power_on(tmp_crtc) &&
|
||||
sde_crtc_get_intf_mode(tmp_crtc) ==
|
||||
INTF_MODE_VIDEO)
|
||||
sde_crtc_get_intf_mode(tmp_crtc,
|
||||
tmp_crtc->state) == INTF_MODE_VIDEO)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -2227,17 +2227,18 @@ end:
|
||||
spin_unlock_irqrestore(&dev->event_lock, flags);
|
||||
}
|
||||
|
||||
enum sde_intf_mode sde_crtc_get_intf_mode(struct drm_crtc *crtc)
|
||||
enum sde_intf_mode sde_crtc_get_intf_mode(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *cstate)
|
||||
{
|
||||
struct drm_encoder *encoder;
|
||||
|
||||
if (!crtc || !crtc->dev) {
|
||||
if (!crtc || !crtc->dev || !cstate) {
|
||||
SDE_ERROR("invalid crtc\n");
|
||||
return INTF_MODE_NONE;
|
||||
}
|
||||
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev,
|
||||
crtc->state->encoder_mask) {
|
||||
cstate->encoder_mask) {
|
||||
/* continue if copy encoder is encountered */
|
||||
if (sde_encoder_in_clone_mode(encoder))
|
||||
continue;
|
||||
@@ -5589,7 +5590,8 @@ static int sde_crtc_debugfs_state_show(struct seq_file *s, void *v)
|
||||
|
||||
seq_printf(s, "num_connectors: %d\n", cstate->num_connectors);
|
||||
seq_printf(s, "client type: %d\n", sde_crtc_get_client_type(crtc));
|
||||
seq_printf(s, "intf_mode: %d\n", sde_crtc_get_intf_mode(crtc));
|
||||
seq_printf(s, "intf_mode: %d\n", sde_crtc_get_intf_mode(crtc,
|
||||
crtc->state));
|
||||
seq_printf(s, "core_clk_rate: %llu\n",
|
||||
sde_crtc->cur_perf.core_clk_rate);
|
||||
for (i = SDE_POWER_HANDLE_DBUS_ID_MNOC;
|
||||
|
@@ -593,9 +593,11 @@ int sde_crtc_register_custom_event(struct sde_kms *kms,
|
||||
|
||||
/**
|
||||
* sde_crtc_get_intf_mode - get interface mode of the given crtc
|
||||
* @crtc: Pointert to crtc
|
||||
* @crtc: Pointert to DRM crtc
|
||||
* @crtc: Pointert to DRM crtc_state
|
||||
*/
|
||||
enum sde_intf_mode sde_crtc_get_intf_mode(struct drm_crtc *crtc);
|
||||
enum sde_intf_mode sde_crtc_get_intf_mode(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *cstate);
|
||||
|
||||
/**
|
||||
* sde_crtc_get_fps_mode - get frame rate of the given crtc
|
||||
@@ -621,14 +623,16 @@ static inline enum sde_crtc_client_type sde_crtc_get_client_type(
|
||||
|
||||
/**
|
||||
* sde_crtc_is_rt_client - check if real-time client or not
|
||||
* @crtc: Pointer to crtc
|
||||
* @crtc: Pointer to DRM crtc
|
||||
* @crtc_state: Pointer to DRM crtc_state
|
||||
*/
|
||||
static inline bool sde_crtc_is_rt_client(struct drm_crtc *crtc)
|
||||
static inline bool sde_crtc_is_rt_client(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *cstate)
|
||||
{
|
||||
if (!crtc || !crtc->state)
|
||||
if (!crtc || !cstate)
|
||||
return true;
|
||||
|
||||
return (sde_crtc_get_intf_mode(crtc) != INTF_MODE_WB_LINE);
|
||||
return (sde_crtc_get_intf_mode(crtc, cstate) != INTF_MODE_WB_LINE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -2406,6 +2406,12 @@ static int _sde_atomic_check_decimation_scaler(struct drm_plane_state *state,
|
||||
uint32_t max_upscale, max_linewidth;
|
||||
bool inline_rotation, rt_client;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *new_cstate;
|
||||
|
||||
if (!state || !state->state || !state->crtc) {
|
||||
SDE_ERROR_PLANE(psde, "invalid arguments\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
deci_w = sde_plane_get_property(pstate, PLANE_PROP_H_DECIMATE);
|
||||
deci_h = sde_plane_get_property(pstate, PLANE_PROP_V_DECIMATE);
|
||||
@@ -2427,7 +2433,9 @@ static int _sde_atomic_check_decimation_scaler(struct drm_plane_state *state,
|
||||
max_linewidth = psde->pipe_sblk->maxlinewidth;
|
||||
|
||||
crtc = state->crtc;
|
||||
rt_client = sde_crtc_is_rt_client(crtc);
|
||||
new_cstate = drm_atomic_get_new_crtc_state(state->state, crtc);
|
||||
|
||||
rt_client = sde_crtc_is_rt_client(crtc, new_cstate);
|
||||
|
||||
max_downscale_denom = 1;
|
||||
/* inline rotation RT clients have a different max downscaling limit */
|
||||
@@ -3208,7 +3216,7 @@ static int sde_plane_sspp_atomic_update(struct drm_plane *plane,
|
||||
return 0;
|
||||
pstate->pending = true;
|
||||
|
||||
psde->is_rt_pipe = sde_crtc_is_rt_client(crtc);
|
||||
psde->is_rt_pipe = sde_crtc_is_rt_client(crtc, crtc->state);
|
||||
_sde_plane_set_qos_ctrl(plane, false, SDE_PLANE_QOS_PANIC_CTRL);
|
||||
|
||||
_sde_plane_update_properties(plane, crtc, fb);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren