All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm/i915: move sdvo mappings to vbt data
Date: Tue, 29 Mar 2016 15:25:52 +0300	[thread overview]
Message-ID: <87y49131yn.fsf@intel.com> (raw)
In-Reply-To: <20160329114509.GS2510@phenom.ffwll.local>

On Tue, 29 Mar 2016, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, Mar 24, 2016 at 05:50:22PM +0200, Jani Nikula wrote:
>> Move all data initialized from VBT under dev_priv->vbt. No functional
>> changes.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_drv.h   |  3 +--
>>  drivers/gpu/drm/i915/intel_bios.c |  2 +-
>>  drivers/gpu/drm/i915/intel_sdvo.c | 16 ++++++++--------
>>  3 files changed, 10 insertions(+), 11 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>> index ad6f69ef95d5..bf867e28731d 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -1491,6 +1491,7 @@ struct intel_vbt_data {
>>  	union child_device_config *child_dev;
>>  
>>  	struct ddi_vbt_port_info ddi_port_info[I915_MAX_PORTS];
>> +	struct sdvo_device_mapping sdvo_mappings[2];
>>  };
>>  
>>  enum intel_ddb_partitioning {
>> @@ -1823,8 +1824,6 @@ struct drm_i915_private {
>>  
>>  	/* Kernel Modesetting */
>>  
>> -	struct sdvo_device_mapping sdvo_mappings[2];
>> -
>>  	struct drm_crtc *plane_to_crtc_mapping[I915_MAX_PIPES];
>>  	struct drm_crtc *pipe_to_crtc_mapping[I915_MAX_PIPES];
>>  	wait_queue_head_t pending_flip_queue;
>> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
>> index 3af8a4a2e145..407fb7a12a49 100644
>> --- a/drivers/gpu/drm/i915/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/intel_bios.c
>> @@ -482,7 +482,7 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv,
>>  			      child->slave_addr,
>>  			      (child->dvo_port == DEVICE_PORT_DVOB) ?
>>  			      "SDVOB" : "SDVOC");
>> -		p_mapping = &(dev_priv->sdvo_mappings[child->dvo_port - 1]);
>> +		p_mapping = &dev_priv->vbt.sdvo_mappings[child->dvo_port - 1];
>
> Is the long-term plan that you pass around a point to dev_priv->vbt into
> all the parsing functions? Could be nice step to reinforce all your work
> to have vbt parsing consolidated into one place.

Yes, eventually I'd like (most of) dev_priv->vbt be private to
intel_bios.c and abstracted away from the rest of the driver.

> Anyway, on patches 2-4: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Thanks, pushed to drm-intel-next-queued.

BR,
Jani.

>
>>  		if (!p_mapping->initialized) {
>>  			p_mapping->dvo_port = child->dvo_port;
>>  			p_mapping->slave_addr = child->slave_addr;
>> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
>> index fae64bc93c1b..2128fae5687d 100644
>> --- a/drivers/gpu/drm/i915/intel_sdvo.c
>> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
>> @@ -2260,9 +2260,9 @@ intel_sdvo_select_ddc_bus(struct drm_i915_private *dev_priv,
>>  	struct sdvo_device_mapping *mapping;
>>  
>>  	if (sdvo->port == PORT_B)
>> -		mapping = &(dev_priv->sdvo_mappings[0]);
>> +		mapping = &dev_priv->vbt.sdvo_mappings[0];
>>  	else
>> -		mapping = &(dev_priv->sdvo_mappings[1]);
>> +		mapping = &dev_priv->vbt.sdvo_mappings[1];
>>  
>>  	if (mapping->initialized)
>>  		sdvo->ddc_bus = 1 << ((mapping->ddc_pin & 0xf0) >> 4);
>> @@ -2278,9 +2278,9 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
>>  	u8 pin;
>>  
>>  	if (sdvo->port == PORT_B)
>> -		mapping = &dev_priv->sdvo_mappings[0];
>> +		mapping = &dev_priv->vbt.sdvo_mappings[0];
>>  	else
>> -		mapping = &dev_priv->sdvo_mappings[1];
>> +		mapping = &dev_priv->vbt.sdvo_mappings[1];
>>  
>>  	if (mapping->initialized &&
>>  	    intel_gmbus_is_valid_pin(dev_priv, mapping->i2c_pin))
>> @@ -2316,11 +2316,11 @@ intel_sdvo_get_slave_addr(struct drm_device *dev, struct intel_sdvo *sdvo)
>>  	struct sdvo_device_mapping *my_mapping, *other_mapping;
>>  
>>  	if (sdvo->port == PORT_B) {
>> -		my_mapping = &dev_priv->sdvo_mappings[0];
>> -		other_mapping = &dev_priv->sdvo_mappings[1];
>> +		my_mapping = &dev_priv->vbt.sdvo_mappings[0];
>> +		other_mapping = &dev_priv->vbt.sdvo_mappings[1];
>>  	} else {
>> -		my_mapping = &dev_priv->sdvo_mappings[1];
>> -		other_mapping = &dev_priv->sdvo_mappings[0];
>> +		my_mapping = &dev_priv->vbt.sdvo_mappings[1];
>> +		other_mapping = &dev_priv->vbt.sdvo_mappings[0];
>>  	}
>>  
>>  	/* If the BIOS described our SDVO device, take advantage of it. */
>> -- 
>> 2.1.4
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

  reply	other threads:[~2016-03-29 12:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 15:50 drm/i915: vbt data housecleaning Jani Nikula
2016-03-24 15:50 ` [PATCH 1/4] drm/i915: use a substruct in vbt data for edp Jani Nikula
2016-03-29 11:43   ` Daniel Vetter
2016-03-24 15:50 ` [PATCH 2/4] drm/i915: move edp low vswing config to vbt data Jani Nikula
2016-03-24 15:50 ` [PATCH 3/4] drm/i915: move sdvo mappings " Jani Nikula
2016-03-29 11:45   ` Daniel Vetter
2016-03-29 12:25     ` Jani Nikula [this message]
2016-03-24 15:50 ` [PATCH 4/4] drm/i915: remove unused dev_priv->render_reclock_avail Jani Nikula
2016-03-24 17:31 ` ✗ Fi.CI.BAT: failure for series starting with [1/4] drm/i915: use a substruct in vbt data for edp Patchwork
2016-03-29 13:44 ` Patchwork
2016-03-29 14:13 ` Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y49131yn.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.