Re: [RFC 1/2] drm/i915: add display uncore helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 05 Nov 2019, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> wrote:
> Quoting Jani Nikula (2019-10-29 12:51:55)
>> Add convenience helpers for the most common uncore operations with
>> struct drm_i915_private * as context rather than struct intel_uncore *.
>> 
>> The goal is to replace all instances of I915_READ(),
>> I915_POSTING_READ(), and I915_WRITE() in display/ with these, to finally
>> be able to get rid of the implicit dev_priv local parameter use.
>> 
>> The idea is that any non-u32 reads or writes are special enough that
>> they can use the intel_uncore_* functions directly.
>> 
>> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
>> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
>> Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
>> Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
>> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
>
> <SNIP>
>
>> +++ b/drivers/gpu/drm/i915/display/intel_display_uncore.h
>> @@ -0,0 +1,36 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright © 2019 Intel Corporation
>> + */
>> +
>> +#ifndef __INTEL_DISPLAY_UNCORE_H__
>> +#define __INTEL_DISPLAY_UNCORE_H__
>
> intel_de_uncore.c/.h for easier finding?
>
>> +
>> +#include "i915_drv.h"
>> +#include "i915_reg.h"
>> +#include "intel_uncore.h"
>> +
>> +static inline u32 intel_de_read(struct drm_i915_private *i915, i915_reg_t reg)
>
> I think it'd be good a opportunity to pass struct intel_de{,_uncore}
> as a parameter, and start grouping DE stuff underneath it?
>
> It'll of course be much bigger change.

One of the main points here was that for display code passing struct
drm_i915_private * should be the easiest thing to do. If there's a need
to group stuff within i915, fine, but no need to pass that here.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux