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

Commit 44a655ca authored by Tvrtko Ursulin's avatar Tvrtko Ursulin
Browse files

drm/i915: Shrink cxsr_latency_table



unsigned long is too wide - use smaller types in
struct cxsr_latency to save 800-something bytes of .rodata.

v2: All data even fits in u16 for even more saving. (Ville Syrjala)
v3: Move bitfields to the end of the struct. (Joonas Lahtinen)

Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent 1c777c5d
Loading
Loading
Loading
Loading
+8 −8
Original line number Original line Diff line number Diff line
@@ -807,14 +807,14 @@ struct intel_watermark_params {
};
};


struct cxsr_latency {
struct cxsr_latency {
	int is_desktop;
	u16 fsb_freq;
	int is_ddr3;
	u16 mem_freq;
	unsigned long fsb_freq;
	u16 display_sr;
	unsigned long mem_freq;
	u16 display_hpll_disable;
	unsigned long display_sr;
	u16 cursor_sr;
	unsigned long display_hpll_disable;
	u16 cursor_hpll_disable;
	unsigned long cursor_sr;
	bool is_desktop : 1;
	unsigned long cursor_hpll_disable;
	bool is_ddr3 : 1;
};
};


#define to_intel_atomic_state(x) container_of(x, struct intel_atomic_state, base)
#define to_intel_atomic_state(x) container_of(x, struct intel_atomic_state, base)
+2 −2
Original line number Original line Diff line number Diff line
@@ -252,8 +252,8 @@ static const struct cxsr_latency cxsr_latency_table[] = {
	{0, 1, 400, 800, 6042, 36042, 6584, 36584},    /* DDR3-800 SC */
	{0, 1, 400, 800, 6042, 36042, 6584, 36584},    /* DDR3-800 SC */
};
};


static const struct cxsr_latency *intel_get_cxsr_latency(int is_desktop,
static const struct cxsr_latency *intel_get_cxsr_latency(bool is_desktop,
							 int is_ddr3,
							 bool is_ddr3,
							 int fsb,
							 int fsb,
							 int mem)
							 int mem)
{
{