[Intel-gfx] [PATCH] drm/i915/dram: hide the dram structs better

Jani Nikula jani.nikula at intel.com
Mon Mar 2 11:50:04 UTC 2020


On Thu, 27 Feb 2020, Ville Syrjälä <ville.syrjala at linux.intel.com> wrote:
> On Thu, Feb 27, 2020 at 04:53:59PM +0200, Jani Nikula wrote:
>> Finish the job started in d28ae3b28187 ("drm/i915: split out
>> intel_dram.[ch] from i915_drv.c") by moving struct dram_dimm_info and
>> dram_channel_info inside intel_dram.c, the only user of the structs.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Thanks, pushed to dinq.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/i915_drv.h   | 10 ----------
>>  drivers/gpu/drm/i915/intel_dram.c | 10 ++++++++++
>>  2 files changed, 10 insertions(+), 10 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>> index ea13fc0b409b..c5a06f864123 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -1274,16 +1274,6 @@ struct drm_i915_private {
>>  	 */
>>  };
>>  
>> -struct dram_dimm_info {
>> -	u8 size, width, ranks;
>> -};
>> -
>> -struct dram_channel_info {
>> -	struct dram_dimm_info dimm_l, dimm_s;
>> -	u8 ranks;
>> -	bool is_16gb_dimm;
>> -};
>> -
>>  static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
>>  {
>>  	return container_of(dev, struct drm_i915_private, drm);
>> diff --git a/drivers/gpu/drm/i915/intel_dram.c b/drivers/gpu/drm/i915/intel_dram.c
>> index 9bb9dd724d3f..6b922efb1d7c 100644
>> --- a/drivers/gpu/drm/i915/intel_dram.c
>> +++ b/drivers/gpu/drm/i915/intel_dram.c
>> @@ -6,6 +6,16 @@
>>  #include "i915_drv.h"
>>  #include "intel_dram.h"
>>  
>> +struct dram_dimm_info {
>> +	u8 size, width, ranks;
>> +};
>> +
>> +struct dram_channel_info {
>> +	struct dram_dimm_info dimm_l, dimm_s;
>> +	u8 ranks;
>> +	bool is_16gb_dimm;
>> +};
>> +
>>  #define DRAM_TYPE_STR(type) [INTEL_DRAM_ ## type] = #type
>>  
>>  static const char *intel_dram_type_str(enum intel_dram_type type)
>> -- 
>> 2.20.1
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list