mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge changes I45b6dcd5,I850ab1fd,I4c9c1a24 into dev/msm-4.14-display
* changes: drm/msm/sde: remove frame done wait from sde_crtc ARM: dts: msm: update sleep vote node for sm8150 clk: qcom: dispcc-sm8150: disable byte0/1 clock gate
This commit is contained in:
commit
afb5675c97
@ -262,33 +262,13 @@
|
||||
|
||||
/* data and reg bus scale settings */
|
||||
qcom,sde-data-bus {
|
||||
qcom,msm-bus,name = "mdss_sde_mnoc";
|
||||
qcom,msm-bus,name = "mdss_sde";
|
||||
qcom,msm-bus,num-cases = <3>;
|
||||
qcom,msm-bus,num-paths = <2>;
|
||||
qcom,msm-bus,vectors-KBps =
|
||||
<22 773 0 0>, <23 773 0 0>,
|
||||
<22 773 0 6400000>, <23 773 0 6400000>,
|
||||
<22 773 0 6400000>, <23 773 0 6400000>;
|
||||
};
|
||||
|
||||
qcom,sde-llcc-bus {
|
||||
qcom,msm-bus,name = "mdss_sde_llcc";
|
||||
qcom,msm-bus,num-cases = <3>;
|
||||
qcom,msm-bus,num-paths = <1>;
|
||||
qcom,msm-bus,vectors-KBps =
|
||||
<132 770 0 0>,
|
||||
<132 770 0 6400000>,
|
||||
<132 770 0 6400000>;
|
||||
};
|
||||
|
||||
qcom,sde-ebi-bus {
|
||||
qcom,msm-bus,name = "mdss_sde_ebi";
|
||||
qcom,msm-bus,num-cases = <3>;
|
||||
qcom,msm-bus,num-paths = <1>;
|
||||
qcom,msm-bus,vectors-KBps =
|
||||
<129 512 0 0>,
|
||||
<129 512 0 6400000>,
|
||||
<129 512 0 6400000>;
|
||||
<22 512 0 0>, <23 512 0 0>,
|
||||
<22 512 0 6400000>, <23 512 0 6400000>,
|
||||
<22 512 0 6400000>, <23 512 0 6400000>;
|
||||
};
|
||||
|
||||
qcom,sde-reg-bus {
|
||||
|
@ -1522,7 +1522,7 @@ static int disp_cc_sm8150_probe(struct platform_device *pdev)
|
||||
clk_trion_pll_configure(&disp_cc_pll1, regmap, &disp_cc_pll1_config);
|
||||
|
||||
/* Enable clock gating for DSI and MDP clocks */
|
||||
regmap_update_bits(regmap, DISP_CC_MISC_CMD, 0x7f0, 0x7f0);
|
||||
regmap_update_bits(regmap, DISP_CC_MISC_CMD, 0x670, 0x670);
|
||||
|
||||
ret = qcom_cc_really_probe(pdev, &disp_cc_sm8150_desc, regmap);
|
||||
if (ret) {
|
||||
|
@ -2300,7 +2300,6 @@ static void sde_crtc_frame_event_work(struct kthread_work *work)
|
||||
struct sde_crtc *sde_crtc;
|
||||
struct sde_kms *sde_kms;
|
||||
unsigned long flags;
|
||||
bool frame_done = false;
|
||||
|
||||
if (!work) {
|
||||
SDE_ERROR("invalid work handle\n");
|
||||
@ -2353,10 +2352,6 @@ static void sde_crtc_frame_event_work(struct kthread_work *work)
|
||||
SDE_EVT32_VERBOSE(DRMID(crtc), fevent->event,
|
||||
SDE_EVTLOG_FUNC_CASE3);
|
||||
}
|
||||
|
||||
if (fevent->event & (SDE_ENCODER_FRAME_EVENT_DONE
|
||||
| SDE_ENCODER_FRAME_EVENT_ERROR))
|
||||
frame_done = true;
|
||||
}
|
||||
|
||||
if (fevent->event & SDE_ENCODER_FRAME_EVENT_SIGNAL_RELEASE_FENCE) {
|
||||
@ -2373,9 +2368,6 @@ static void sde_crtc_frame_event_work(struct kthread_work *work)
|
||||
SDE_ERROR("crtc%d ts:%lld received panel dead event\n",
|
||||
crtc->base.id, ktime_to_ns(fevent->ts));
|
||||
|
||||
if (frame_done)
|
||||
complete_all(&sde_crtc->frame_done_comp);
|
||||
|
||||
spin_lock_irqsave(&sde_crtc->spin_lock, flags);
|
||||
list_add_tail(&fevent->list, &sde_crtc->frame_event_list);
|
||||
spin_unlock_irqrestore(&sde_crtc->spin_lock, flags);
|
||||
@ -3293,10 +3285,10 @@ static void sde_crtc_destroy_state(struct drm_crtc *crtc,
|
||||
&cstate->property_state);
|
||||
}
|
||||
|
||||
static int _sde_crtc_wait_for_frame_done(struct drm_crtc *crtc)
|
||||
static int _sde_crtc_flush_event_thread(struct drm_crtc *crtc)
|
||||
{
|
||||
struct sde_crtc *sde_crtc;
|
||||
int ret, rc = 0, i;
|
||||
int i;
|
||||
|
||||
if (!crtc) {
|
||||
SDE_ERROR("invalid argument\n");
|
||||
@ -3320,17 +3312,9 @@ static int _sde_crtc_wait_for_frame_done(struct drm_crtc *crtc)
|
||||
kthread_flush_work(&sde_crtc->frame_events[i].work);
|
||||
}
|
||||
|
||||
ret = wait_for_completion_timeout(&sde_crtc->frame_done_comp,
|
||||
msecs_to_jiffies(SDE_FRAME_DONE_TIMEOUT));
|
||||
if (!ret) {
|
||||
SDE_ERROR("frame done completion wait timed out, ret:%d\n",
|
||||
ret);
|
||||
SDE_EVT32(DRMID(crtc), SDE_EVTLOG_FATAL);
|
||||
rc = -ETIMEDOUT;
|
||||
}
|
||||
SDE_EVT32_VERBOSE(DRMID(crtc), SDE_EVTLOG_FUNC_EXIT);
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _sde_crtc_commit_kickoff_rot(struct drm_crtc *crtc,
|
||||
@ -3654,7 +3638,6 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
|
||||
struct sde_kms *sde_kms;
|
||||
struct sde_crtc_state *cstate;
|
||||
bool is_error, reset_req;
|
||||
int ret;
|
||||
|
||||
if (!crtc) {
|
||||
SDE_ERROR("invalid argument\n");
|
||||
@ -3713,20 +3696,9 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
|
||||
}
|
||||
sde_crtc->reset_request = reset_req;
|
||||
|
||||
/* wait for frame_event_done completion */
|
||||
SDE_ATRACE_BEGIN("wait_for_frame_done_event");
|
||||
ret = _sde_crtc_wait_for_frame_done(crtc);
|
||||
SDE_ATRACE_END("wait_for_frame_done_event");
|
||||
if (ret) {
|
||||
SDE_ERROR("crtc%d wait for frame done failed;frame_pending%d\n",
|
||||
crtc->base.id,
|
||||
atomic_read(&sde_crtc->frame_pending));
|
||||
|
||||
is_error = true;
|
||||
|
||||
/* force offline rotation mode since the commit has no pipes */
|
||||
cstate->sbuf_cfg.rot_op_mode = SDE_CTL_ROT_OP_MODE_OFFLINE;
|
||||
}
|
||||
SDE_ATRACE_BEGIN("flush_event_thread");
|
||||
_sde_crtc_flush_event_thread(crtc);
|
||||
SDE_ATRACE_END("flush_event_thread");
|
||||
|
||||
if (atomic_inc_return(&sde_crtc->frame_pending) == 1) {
|
||||
/* acquire bandwidth and other resources */
|
||||
@ -3765,7 +3737,6 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
|
||||
sde_encoder_kickoff(encoder, false);
|
||||
}
|
||||
|
||||
reinit_completion(&sde_crtc->frame_done_comp);
|
||||
SDE_ATRACE_END("crtc_commit");
|
||||
}
|
||||
|
||||
@ -4164,11 +4135,7 @@ static void sde_crtc_disable(struct drm_crtc *crtc)
|
||||
if (cstate->num_ds_enabled)
|
||||
sde_crtc->ds_reconfig = true;
|
||||
|
||||
/* wait for frame_event_done completion */
|
||||
if (_sde_crtc_wait_for_frame_done(crtc))
|
||||
SDE_ERROR("crtc%d wait for frame done failed;frame_pending%d\n",
|
||||
crtc->base.id,
|
||||
atomic_read(&sde_crtc->frame_pending));
|
||||
_sde_crtc_flush_event_thread(crtc);
|
||||
|
||||
SDE_EVT32(DRMID(crtc), sde_crtc->enabled, sde_crtc->suspend,
|
||||
sde_crtc->vblank_requested,
|
||||
@ -4183,6 +4150,8 @@ static void sde_crtc_disable(struct drm_crtc *crtc)
|
||||
sde_crtc->enabled = false;
|
||||
|
||||
if (atomic_read(&sde_crtc->frame_pending)) {
|
||||
SDE_ERROR("crtc%d frame_pending%d\n", crtc->base.id,
|
||||
atomic_read(&sde_crtc->frame_pending));
|
||||
SDE_EVT32(DRMID(crtc), atomic_read(&sde_crtc->frame_pending),
|
||||
SDE_EVTLOG_FUNC_CASE2);
|
||||
sde_core_perf_crtc_release_bw(crtc);
|
||||
@ -6003,7 +5972,6 @@ struct drm_crtc *sde_crtc_init(struct drm_device *dev, struct drm_plane *plane)
|
||||
mutex_init(&sde_crtc->rp_lock);
|
||||
INIT_LIST_HEAD(&sde_crtc->rp_head);
|
||||
|
||||
init_completion(&sde_crtc->frame_done_comp);
|
||||
sde_crtc->enabled = false;
|
||||
|
||||
INIT_LIST_HEAD(&sde_crtc->frame_event_list);
|
||||
|
@ -158,7 +158,6 @@ struct sde_crtc_event {
|
||||
* @spin_lock : spin lock for frame event, transaction status, etc...
|
||||
* @retire_events : static allocation of retire fence connector
|
||||
* @retire_event_list : available retire fence connector list
|
||||
* @frame_done_comp : for frame_event_done synchronization
|
||||
* @event_thread : Pointer to event handler thread
|
||||
* @event_worker : Event worker queue
|
||||
* @event_cache : Local cache of event worker structures
|
||||
@ -228,7 +227,6 @@ struct sde_crtc {
|
||||
spinlock_t spin_lock;
|
||||
struct sde_crtc_retire_event retire_events[SDE_CRTC_FRAME_EVENT_SIZE];
|
||||
struct list_head retire_event_list;
|
||||
struct completion frame_done_comp;
|
||||
|
||||
/* for handling internal event thread */
|
||||
struct sde_crtc_event event_cache[SDE_CRTC_MAX_EVENT_COUNT];
|
||||
|
Loading…
x
Reference in New Issue
Block a user