Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07f053ba authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Use generic data type for rect"

parents b0cbff67 d474c9d1
Loading
Loading
Loading
Loading
+12 −19
Original line number Diff line number Diff line
@@ -120,13 +120,6 @@ enum mdp_wfd_blk_type {
struct mdss_mdp_ctl;
typedef void (*mdp_vsync_handler_t)(struct mdss_mdp_ctl *, ktime_t);

struct mdss_mdp_img_rect {
	u16 x;
	u16 y;
	u16 w;
	u16 h;
};

struct mdss_mdp_vsync_handler {
	bool enabled;
	bool cmd_post_flush;
@@ -192,8 +185,8 @@ struct mdss_mdp_ctl {
	struct work_struct recover_work;
	struct work_struct remove_underrun_handler;

	struct mdss_mdp_img_rect roi;
	struct mdss_mdp_img_rect roi_bkup;
	struct mdss_rect roi;
	struct mdss_rect roi_bkup;
	u8 roi_changed;

	int (*start_fnc) (struct mdss_mdp_ctl *ctl);
@@ -226,7 +219,7 @@ struct mdss_mdp_mixer {
	u8 params_changed;
	u16 width;
	u16 height;
	struct mdss_mdp_img_rect roi;
	struct mdss_rect roi;
	u8 cursor_enabled;
	u16 cursor_hotx;
	u16 cursor_hoty;
@@ -387,8 +380,8 @@ struct mdss_mdp_pipe {
	u16 img_height;
	u8 horz_deci;
	u8 vert_deci;
	struct mdss_mdp_img_rect src;
	struct mdss_mdp_img_rect dst;
	struct mdss_rect src;
	struct mdss_rect dst;
	struct mdss_mdp_format_params *src_fmt;
	struct mdss_mdp_plane_sizes src_planes;

@@ -631,7 +624,7 @@ int mdss_mdp_perf_bw_check(struct mdss_mdp_ctl *ctl,
int mdss_mdp_perf_bw_check_pipe(struct mdss_mdp_perf_params *perf,
		struct mdss_mdp_pipe *pipe);
int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe,
	struct mdss_mdp_perf_params *perf, struct mdss_mdp_img_rect *roi,
	struct mdss_mdp_perf_params *perf, struct mdss_rect *roi,
	bool apply_fudge);
int mdss_mdp_ctl_notify(struct mdss_mdp_ctl *ctl, int event);
void mdss_mdp_ctl_notifier_register(struct mdss_mdp_ctl *ctl,
@@ -754,12 +747,12 @@ int mdss_mdp_get_img(struct msmfb_data *img, struct mdss_mdp_img_data *data);
int mdss_mdp_overlay_free_buf(struct mdss_mdp_data *data);
u32 mdss_get_panel_framerate(struct msm_fb_data_type *mfd);
int mdss_mdp_calc_phase_step(u32 src, u32 dst, u32 *out_phase);
void mdss_mdp_intersect_rect(struct mdss_mdp_img_rect *res_rect,
	const struct mdss_mdp_img_rect *dst_rect,
	const struct mdss_mdp_img_rect *sci_rect);
void mdss_mdp_crop_rect(struct mdss_mdp_img_rect *src_rect,
	struct mdss_mdp_img_rect *dst_rect,
	const struct mdss_mdp_img_rect *sci_rect);
void mdss_mdp_intersect_rect(struct mdss_rect *res_rect,
	const struct mdss_rect *dst_rect,
	const struct mdss_rect *sci_rect);
void mdss_mdp_crop_rect(struct mdss_rect *src_rect,
	struct mdss_rect *dst_rect,
	const struct mdss_rect *sci_rect);


int mdss_mdp_wb_kickoff(struct msm_fb_data_type *mfd);
+13 −16
Original line number Diff line number Diff line
@@ -365,13 +365,13 @@ static inline bool mdss_mdp_is_single_pipe_per_mixer(
 * (MDP clock requirement) based on frame size and scaling requirements.
 */
int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe,
	struct mdss_mdp_perf_params *perf, struct mdss_mdp_img_rect *roi,
	struct mdss_mdp_perf_params *perf, struct mdss_rect *roi,
	bool apply_fudge)
{
	struct mdss_mdp_mixer *mixer;
	int fps = DEFAULT_FRAME_RATE;
	u32 quota, rate, v_total, src_h, xres = 0, h_total = 0;
	struct mdss_mdp_img_rect src, dst;
	struct mdss_rect src, dst;
	bool is_fbc = false;
	struct mdss_mdp_prefill_params prefill_params;

@@ -1467,7 +1467,7 @@ int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl)

	ctl->width = width;
	ctl->height = height;
	ctl->roi = (struct mdss_mdp_img_rect) {0, 0, width, height};
	ctl->roi = (struct mdss_rect) {0, 0, width, height};

	if (!ctl->mixer_left) {
		ctl->mixer_left =
@@ -1490,7 +1490,7 @@ int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl)

	ctl->mixer_left->width = width;
	ctl->mixer_left->height = height;
	ctl->mixer_left->roi = (struct mdss_mdp_img_rect) {0, 0, width, height};
	ctl->mixer_left->roi = (struct mdss_rect) {0, 0, width, height};

	if (split_ctl) {
		pr_debug("split display detected\n");
@@ -1514,7 +1514,7 @@ int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl)
		ctl->mixer_right->is_right_mixer = true;
		ctl->mixer_right->width = width;
		ctl->mixer_right->height = height;
		ctl->mixer_right->roi = (struct mdss_mdp_img_rect)
		ctl->mixer_right->roi = (struct mdss_rect)
						{0, 0, width, height};
	} else if (ctl->mixer_right) {
		mdss_mdp_mixer_free(ctl->mixer_right);
@@ -1730,7 +1730,7 @@ int mdss_mdp_ctl_split_display_setup(struct mdss_mdp_ctl *ctl,
	mixer->is_right_mixer = true;
	mixer->width = sctl->width;
	mixer->height = sctl->height;
	mixer->roi = (struct mdss_mdp_img_rect)
	mixer->roi = (struct mdss_rect)
				{0, 0, mixer->width, mixer->height};
	sctl->mixer_left = mixer;

@@ -2054,7 +2054,7 @@ int mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl)
void mdss_mdp_set_roi(struct mdss_mdp_ctl *ctl,
		struct mdp_display_commit *data)
{
	struct mdss_mdp_img_rect temp_roi, mixer_roi;
	struct mdss_rect temp_roi, mixer_roi;

	temp_roi.x =  data->roi.x;
	temp_roi.y =  data->roi.y;
@@ -2069,16 +2069,13 @@ void mdss_mdp_set_roi(struct mdss_mdp_ctl *ctl,
	if (!temp_roi.w || !temp_roi.h || ctl->mixer_right ||
			(ctl->panel_data->panel_info.type != MIPI_CMD_PANEL) ||
			!ctl->panel_data->panel_info.partial_update_enabled) {
		temp_roi = (struct mdss_mdp_img_rect)
		temp_roi = (struct mdss_rect)
				{0, 0, ctl->mixer_left->width,
					ctl->mixer_left->height};
	}

	ctl->roi_changed = 0;
	if (((temp_roi.x != ctl->roi.x) ||
			(temp_roi.y != ctl->roi.y)) ||
			((temp_roi.w != ctl->roi.w) ||
			 (temp_roi.h != ctl->roi.h))) {
	if (!mdss_rect_cmp(&temp_roi, &ctl->roi)) {
		ctl->roi = temp_roi;
		ctl->roi_changed++;

+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ struct mdss_mdp_writeback_ctx {
	struct mdss_mdp_format_params *dst_fmt;
	u16 width;
	u16 height;
	struct mdss_mdp_img_rect dst_rect;
	struct mdss_rect dst_rect;

	u8 rot90;
	u32 bwc_mode;
+1 −1
Original line number Diff line number Diff line
@@ -1057,7 +1057,7 @@ static int mdss_mdp_image_setup(struct mdss_mdp_pipe *pipe,
	u32 tmp_src_xy, tmp_src_size;
	int ret = 0;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	struct mdss_mdp_img_rect sci, dst, src;
	struct mdss_rect sci, dst, src;

	pr_debug("pnum=%d wh=%dx%d src={%d,%d,%d,%d} dst={%d,%d,%d,%d}\n",
			pipe->num, pipe->img_width, pipe->img_height,
+2 −2
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@ struct mdss_mdp_rotator_session {

	u16 img_width;
	u16 img_height;
	struct mdss_mdp_img_rect src_rect;
	struct mdss_mdp_img_rect dst;
	struct mdss_rect src_rect;
	struct mdss_rect dst;

	u32 bwc_mode;
	struct mdss_mdp_pipe *pipe;
Loading