Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636357

Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers

From Icenowy Zheng <icenowy@aosc.io>
Newsgroups linux.kernel
Subject Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers
Date 2017-05-05 14:40 +0200
Message-ID <tDKGD-1J7-23@gated-at.bofh.it> (permalink)
References <tDnqF-2R5-1@gated-at.bofh.it> <tDnAm-2VI-7@gated-at.bofh.it> <tDoG5-3Su-5@gated-at.bofh.it> <tDsgF-6aT-9@gated-at.bofh.it> <tDKGC-1J7-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



于 2017年5月5日 GMT+08:00 下午8:36:18, Maxime Ripard <maxime.ripard@free-electrons.com> 写到:
>On Fri, May 05, 2017 at 12:50:51AM +0800, icenowy@aosc.io wrote:
>> > > +void sun8i_mixer_layer_enable(struct sun8i_mixer *mixer,
>> > > +				int layer, bool enable)
>> > > +{
>> > > +	u32 val;
>> > > +	/* Currently the first UI channel is used */
>> > > +	int chan = mixer->cfg->vi_num;
>> > > +
>> > > +	DRM_DEBUG_DRIVER("Enabling layer %d in channel %d\n", layer,
>chan);
>> > > +
>> > > +	if (enable)
>> > > +		val = SUN8I_MIXER_CHAN_UI_LAYER_ATTR_EN;
>> > > +	else
>> > > +		val = 0;
>> > > +
>> > > +	regmap_update_bits(mixer->engine.regs,
>> > > +			   SUN8I_MIXER_CHAN_UI_LAYER_ATTR(chan, layer),
>> > > +			   SUN8I_MIXER_CHAN_UI_LAYER_ATTR_EN, val);
>> > > +
>> > > +	/* Set the alpha configuration */
>> > > +	regmap_update_bits(mixer->engine.regs,
>> > > +			   SUN8I_MIXER_CHAN_UI_LAYER_ATTR(chan, layer),
>> > > +			   SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_MODE_MASK,
>> > > +			   SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_MODE_DEF);
>> > > +	regmap_update_bits(mixer->engine.regs,
>> > > +			   SUN8I_MIXER_CHAN_UI_LAYER_ATTR(chan, layer),
>> > > +			   SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_MASK,
>> > > +			   SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_DEF);
>> > > +}
>> > 
>> > This one too.
>> 
>> It's called from sun8i_layer.c, so it cannot be static.
>
>Fair enough.
>
>> > > +	/* Set base coordinates */
>> > > +	DRM_DEBUG_DRIVER("Layer coordinates X: %d Y: %d\n",
>> > > +			 state->crtc_x, state->crtc_y);
>> > > +	regmap_write(mixer->engine.regs,
>> > > +		     SUN8I_MIXER_CHAN_UI_LAYER_COORD(chan, layer),
>> > > +		     SUN8I_MIXER_COORD(state->crtc_x, state->crtc_y));
>> > 
>> > X and Y are fixed point numbers. You want to keep only the higher
>16
>> > bits there.
>> 
>> Do you mean "lower 16 bits"? Thus should I (x & 0xffff) or ((u16)x) ?
>
>Nevermind, I got confused with src_x and src_y.
>
>> P.S. The negative coordinates are broken, how should I deal with it?
>or
>> is the coordinates promised to be not negative?
>
>Adjust the buffer base address, and use a shorter line. You have such
>an example in the sun4i code.

Are they these two lines:
```
paddr += (state->src_x >> 16) * bpp;
paddr += (state->src_y >> 16) * fb->pitches[0];
```

I think I copied them here, so I don't need to mind this problem any more, right?

>
>Maxime

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 00/13] Initial Allwinner Display Engine 2.0 Support Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 13:50 +0200
  [PATCH v6 01/13] dt-bindings: add binding for the Allwinner DE2 CCU Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 13:50 +0200
  [PATCH v6 10/13] drm/sun4i: tcon: add support for V3s TCON Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [linux-sunxi] [PATCH v6 10/13] drm/sun4i: tcon: add support for  V3s TCON Chen-Yu Tsai <wens@csie.org> - 2017-05-05 05:40 +0200
  [PATCH v6 11/13] ARM: dts: sun8i: add DE2 nodes for V3s SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [linux-sunxi] [PATCH v6 11/13] ARM: dts: sun8i: add DE2 nodes for  V3s SoC Chen-Yu Tsai <wens@csie.org> - 2017-05-05 05:40 +0200
      Re: [linux-sunxi] [PATCH v6 11/13] ARM: dts: sun8i: add DE2 nodes for  V3s SoC icenowy@aosc.io - 2017-05-05 11:00 +0200
        Re: [linux-sunxi] [PATCH v6 11/13] ARM: dts: sun8i: add DE2 nodes for V3s SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-05 14:40 +0200
          Re: [linux-sunxi] [PATCH v6 11/13] ARM: dts: sun8i: add DE2 nodes  for V3s SoC Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-09 21:30 +0200
        Re: [linux-sunxi] [PATCH v6 11/13] ARM: dts: sun8i: add DE2 nodes  for V3s SoC Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-05 14:40 +0200
  [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-04 15:10 +0200
      Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers icenowy@aosc.io - 2017-05-04 19:00 +0200
        Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers icenowy@aosc.io - 2017-05-04 19:20 +0200
      Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers icenowy@aosc.io - 2017-05-04 19:00 +0200
        Re: [linux-sunxi] Re: [PATCH v6 08/13] drm/sun4i: add support for  Allwinner DE2 mixers Chen-Yu Tsai <wens@csie.org> - 2017-05-05 05:50 +0200
      Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers icenowy@aosc.io - 2017-05-04 19:00 +0200
        Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-05 14:40 +0200
          Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers Icenowy Zheng <icenowy@aosc.io> - 2017-05-05 14:40 +0200
            Re: [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-09 22:30 +0200
  [PATCH v6 13/13] [DO NOT MERGE] ARM: dts: sun8i: enable LCD panel of Lichee Pi Zero Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
  [PATCH v6 09/13] drm/sun4i: Add compatible string for V3s display engine Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
  [PATCH v6 05/13] drm/sun4i: abstract a engine type Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [linux-sunxi] [PATCH v6 05/13] drm/sun4i: abstract a engine type Chen-Yu Tsai <wens@csie.org> - 2017-05-05 05:00 +0200
      Re: [linux-sunxi] [PATCH v6 05/13] drm/sun4i: abstract a engine type Chen-Yu Tsai <wens@csie.org> - 2017-05-05 10:40 +0200
      Re: [linux-sunxi] [PATCH v6 05/13] drm/sun4i: abstract a engine type icenowy@aosc.io - 2017-05-05 10:40 +0200
  [PATCH v6 04/13] drm/sun4i: return only planes for layers created Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
  [PATCH v6 03/13] dt-bindings: add bindings for DE2 on V3s SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [linux-sunxi] [PATCH v6 03/13] dt-bindings: add bindings for DE2  on V3s SoC Chen-Yu Tsai <wens@csie.org> - 2017-05-05 05:30 +0200
  [PATCH v6 07/13] drm/sun4i: add a Kconfig option for sun4i-backend Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [linux-sunxi] [PATCH v6 07/13] drm/sun4i: add a Kconfig option  for sun4i-backend Chen-Yu Tsai <wens@csie.org> - 2017-05-05 05:20 +0200
  [PATCH v6 02/13] clk: sunxi-ng: add support for DE2 CCU Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [PATCH v6 02/13] clk: sunxi-ng: add support for DE2 CCU Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-04 15:00 +0200
  [PATCH v6 06/13] drm/sun4i: add a dedicated module for sun4i-backend and sun4i-layer Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [linux-sunxi] [PATCH v6 06/13] drm/sun4i: add a dedicated module  for sun4i-backend and sun4i-layer Chen-Yu Tsai <wens@csie.org> - 2017-05-05 05:20 +0200
  [PATCH v6 12/13] ARM: dts: sun8i: add pinmux for LCD pins of V3s SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-04 14:00 +0200
    Re: [linux-sunxi] [PATCH v6 12/13] ARM: dts: sun8i: add pinmux for  LCD pins of V3s SoC Chen-Yu Tsai <wens@csie.org> - 2017-05-05 05:30 +0200

csiph-web