Message ID | 20180215053300.70482-3-dcastagna@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi uma.shankar, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on rockchip/for-next] [also build test WARNING on v4.16-rc1 next-20180216] [cannot apply to drm/drm-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Daniele-Castagna/drm-rockchip-YUV-overlays-BT-601-color-conversion/20180216-233006 base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next reproduce: make htmldocs All warnings (new ones prefixed by >>): include/linux/crypto.h:477: warning: Function parameter or member 'cra_u.blkcipher' not described in 'crypto_alg' include/linux/crypto.h:477: warning: Function parameter or member 'cra_u.cipher' not described in 'crypto_alg' include/linux/crypto.h:477: warning: Function parameter or member 'cra_u.compress' not described in 'crypto_alg' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.ibss' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.connect' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.keys' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.ie' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.ie_len' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.bssid' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.prev_bssid' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.ssid' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.default_key' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.default_mgmt_key' not described in 'wireless_dev' include/net/cfg80211.h:4129: warning: Function parameter or member 'wext.prev_bssid_valid' not described in 'wireless_dev' include/net/mac80211.h:2259: warning: Function parameter or member 'radiotap_timestamp.units_pos' not described in 'ieee80211_hw' include/net/mac80211.h:2259: warning: Function parameter or member 'radiotap_timestamp.accuracy' not described in 'ieee80211_hw' include/net/mac80211.h:950: warning: Function parameter or member 'rates' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.rts_cts_rate_idx' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.use_rts' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.use_cts_prot' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.short_preamble' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.skip_table' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.jiffies' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.vif' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.hw_key' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.flags' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'control.enqueue_time' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'ack' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'ack.cookie' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.rates' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.ack_signal' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.ampdu_ack_len' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.ampdu_len' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.antenna' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status.tx_time' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'status_driver_data' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'driver_rates' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'pad' not described in 'ieee80211_tx_info' include/net/mac80211.h:950: warning: Function parameter or member 'rate_driver_data' not described in 'ieee80211_tx_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'rx_stats_avg' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'rx_stats_avg.signal' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'rx_stats_avg.chain_signal' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.filtered' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.retry_failed' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.retry_count' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.lost_packets' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.last_tdls_pkt_time' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'msdu_retries' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'msdu_failed' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'status_stats.last_ack' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'tx_stats.packets' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'tx_stats.bytes' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'tx_stats.last_rate' not described in 'sta_info' net/mac80211/sta_info.h:584: warning: Function parameter or member 'msdu' not described in 'sta_info' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_excl.cb' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_excl.poll' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_excl.active' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_shared.cb' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_shared.poll' not described in 'dma_buf' include/linux/dma-buf.h:307: warning: Function parameter or member 'cb_shared.active' not described in 'dma_buf' include/linux/dma-fence-array.h:54: warning: Function parameter or member 'work' not described in 'dma_fence_array' include/linux/gpio/driver.h:142: warning: Function parameter or member 'request_key' not described in 'gpio_irq_chip' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.sign' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.realbits' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.storagebits' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.shift' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.repeat' not described in 'iio_chan_spec' include/linux/iio/iio.h:270: warning: Function parameter or member 'scan_type.endianness' not described in 'iio_chan_spec' include/linux/iio/hw-consumer.h:1: warning: no structured comments found include/linux/device.h:294: warning: Function parameter or member 'coredump' not described in 'device_driver' include/linux/input/sparse-keymap.h:46: warning: Function parameter or member 'sw' not described in 'key_entry' include/linux/mtd/rawnand.h:709: warning: Function parameter or member 'timings.sdr' not described in 'nand_data_interface' include/linux/mtd/rawnand.h:774: warning: Function parameter or member 'buf' not described in 'nand_op_data_instr' include/linux/mtd/rawnand.h:774: warning: Function parameter or member 'buf.in' not described in 'nand_op_data_instr' include/linux/mtd/rawnand.h:774: warning: Function parameter or member 'buf.out' not described in 'nand_op_data_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx.cmd' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx.addr' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx.data' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:820: warning: Function parameter or member 'ctx.waitrdy' not described in 'nand_op_instr' include/linux/mtd/rawnand.h:967: warning: Function parameter or member 'ctx' not described in 'nand_op_parser_pattern_elem' include/linux/mtd/rawnand.h:967: warning: Function parameter or member 'ctx.addr' not described in 'nand_op_parser_pattern_elem' include/linux/mtd/rawnand.h:967: warning: Function parameter or member 'ctx.data' not described in 'nand_op_parser_pattern_elem' include/linux/mtd/rawnand.h:1281: warning: Function parameter or member 'manufacturer.desc' not described in 'nand_chip' include/linux/mtd/rawnand.h:1281: warning: Function parameter or member 'manufacturer.priv' not described in 'nand_chip' include/linux/regulator/driver.h:221: warning: Function parameter or member 'resume_early' not described in 'regulator_ops' drivers/regulator/core.c:4299: warning: Excess function parameter 'state' description in 'regulator_suspend_late' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw0' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw1' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw2' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw3' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.eadm' not described in 'irb' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_pin' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_unpin' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_res_obj' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_get_sg_table' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_import_sg_table' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_vmap' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_vunmap' not described in 'drm_driver' include/drm/drm_drv.h:609: warning: Function parameter or member 'gem_prime_mmap' not described in 'drm_driver' >> include/drm/drm_plane.h:146: warning: Function parameter or member 'degamma_lut' not described in 'drm_plane_state' >> include/drm/drm_plane.h:146: warning: Function parameter or member 'color_mgmt_changed' not described in 'drm_plane_state' include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.left' not described in 'drm_tv_connector_state' include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.right' not described in 'drm_tv_connector_state' include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.top' not described in 'drm_tv_connector_state' include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.bottom' not described in 'drm_tv_connector_state' include/drm/drm_vblank.h:63: warning: Function parameter or member 'event.base' not described in 'drm_pending_vblank_event' include/drm/drm_vblank.h:63: warning: Function parameter or member 'event.vbl' not described in 'drm_pending_vblank_event' include/drm/drm_vblank.h:63: warning: Function parameter or member 'event.seq' not described in 'drm_pending_vblank_event' drivers/gpu/drm/tve200/tve200_drv.c:1: warning: no structured comments found include/linux/skbuff.h:846: warning: Function parameter or member 'dev_scratch' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'skb_mstamp' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member '__cloned_offset' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'head_frag' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member '__unused' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member '__pkt_type_offset' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'pfmemalloc' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'encapsulation' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'encap_hdr_csum' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'csum_valid' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'csum_complete_sw' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'csum_level' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'inner_protocol_type' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'remcsum_offload' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'offload_fwd_mark' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'offload_mr_fwd_mark' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'sender_cpu' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'reserved_tailroom' not described in 'sk_buff' include/linux/skbuff.h:846: warning: Function parameter or member 'inner_ipproto' not described in 'sk_buff' include/net/sock.h:234: warning: Function parameter or member 'skc_addrpair' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_portpair' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_ipv6only' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_net_refcnt' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_v6_daddr' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_v6_rcv_saddr' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_cookie' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_listener' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_tw_dr' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_rcv_wnd' not described in 'sock_common' include/net/sock.h:234: warning: Function parameter or member 'skc_tw_rcv_nxt' not described in 'sock_common' include/net/sock.h:487: warning: Function parameter or member 'sk_backlog.rmem_alloc' not described in 'sock' include/net/sock.h:487: warning: Function parameter or member 'sk_backlog.len' not described in 'sock' include/net/sock.h:487: warning: Function parameter or member 'sk_backlog.head' not described in 'sock' include/net/sock.h:487: warning: Function parameter or member 'sk_backlog.tail' not described in 'sock' include/net/sock.h:487: warning: Function parameter or member 'sk_wq_raw' not described in 'sock' include/net/sock.h:487: warning: Function parameter or member 'tcp_rtx_queue' not described in 'sock' include/linux/netdevice.h:1940: warning: Function parameter or member 'adj_list.upper' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'adj_list.lower' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'gso_partial_features' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'switchdev_ops' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'l3mdev_ops' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'xfrmdev_ops' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'name_assign_type' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'ieee802154_ptr' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'mpls_ptr' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'xdp_prog' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'gro_flush_timeout' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'nf_hooks_ingress' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member '____cacheline_aligned_in_smp' not described in 'net_device' include/linux/netdevice.h:1940: warning: Function parameter or member 'qdisc_hash' not described in 'net_device' include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 'phylink_link_state' include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 'phylink_link_state' include/linux/rcupdate.h:570: ERROR: Unexpected indentation. include/linux/rcupdate.h:574: ERROR: Unexpected indentation. include/linux/rcupdate.h:578: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/rcupdate.h:580: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/rcupdate.h:580: WARNING: Inline literal start-string without end-string. kernel/time/timer.c:1259: ERROR: Unexpected indentation. kernel/time/timer.c:1261: ERROR: Unexpected indentation. kernel/time/timer.c:1262: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/wait.h:110: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/wait.h:113: ERROR: Unexpected indentation. include/linux/wait.h:115: WARNING: Block quote ends without a blank line; unexpected unindent. kernel/time/hrtimer.c:1113: WARNING: Block quote ends without a blank line; unexpected unindent. kernel/signal.c:327: WARNING: Inline literal start-string without end-string. drivers/video/fbdev/core/modedb.c:647: WARNING: Inline strong start-string without end-string. drivers/video/fbdev/core/modedb.c:647: WARNING: Inline strong start-string without end-string. drivers/video/fbdev/core/modedb.c:647: WARNING: Inline strong start-string without end-string. drivers/video/fbdev/core/modedb.c:647: WARNING: Inline strong start-string without end-string. include/linux/iio/iio.h:191: ERROR: Unexpected indentation. include/linux/iio/iio.h:192: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/iio/iio.h:198: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/ata/libata-core.c:5920: ERROR: Unknown target name: "hw". drivers/message/fusion/mptbase.c:5052: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/tty/serial/serial_core.c:1901: WARNING: Definition list ends without a blank line; unexpected unindent. include/linux/mtd/rawnand.h:805: ERROR: Unexpected indentation. include/linux/mtd/rawnand.h:1391: WARNING: Inline strong start-string without end-string. include/linux/mtd/rawnand.h:1393: WARNING: Inline strong start-string without end-string. include/linux/regulator/driver.h:273: ERROR: Unknown target name: "regulator_regmap_x_voltage". Documentation/driver-api/slimbus.rst:93: WARNING: Title underline too short. vim +146 include/drm/drm_plane.h 43968d7b Daniel Vetter 2016-09-21 @146 :::::: The code at line 146 was first introduced by commit :::::: 43968d7b806d7a7e021261294c583a216fddf0e5 drm: Extract drm_plane.[hc] :::::: TO: Daniel Vetter <daniel.vetter@ffwll.ch> :::::: CC: Sean Paul <seanpaul@chromium.org> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
On Thu, Feb 15, 2018 at 12:32:52AM -0500, Daniele Castagna wrote: > From: "uma.shankar at intel.com (Uma Shankar)" <uma.shankar@intel.com> > > Add Plane Degamma as a blob property and plane > degamma size as a range property. > > (am from https://patchwork.kernel.org/patch/10046515/) > > Change-Id: Iaead6f944a8b677227d1be11169f46178de533b1 > Signed-off-by: Uma Shankar <uma.shankar at intel.com> > --- > drivers/gpu/drm/drm_atomic.c | 12 ++++++++++++ > drivers/gpu/drm/drm_atomic_helper.c | 7 +++++++ > drivers/gpu/drm/drm_mode_config.c | 14 ++++++++++++++ > include/drm/drm_mode_config.h | 10 ++++++++++ > include/drm/drm_plane.h | 10 ++++++++++ > 5 files changed, 53 insertions(+) > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c > index b76d49218cf1d..4a06ff2fd1a5e 100644 > --- a/drivers/gpu/drm/drm_atomic.c > +++ b/drivers/gpu/drm/drm_atomic.c > @@ -717,6 +717,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, > { > struct drm_device *dev = plane->dev; > struct drm_mode_config *config = &dev->mode_config; > + bool replaced = false; > + int ret; > > if (property == config->prop_fb_id) { > struct drm_framebuffer *fb = drm_framebuffer_lookup(dev, NULL, val); > @@ -762,6 +764,12 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, > } else if (plane->funcs->atomic_set_property) { > return plane->funcs->atomic_set_property(plane, state, > property, val); > + } else if (property == config->plane_degamma_lut_property) { > + ret = drm_atomic_replace_property_blob_from_id(dev, > + &state->degamma_lut, > + val, -1, &replaced); > + state->color_mgmt_changed |= replaced; > + return ret; > } else { > return -EINVAL; > } > @@ -820,6 +828,9 @@ drm_atomic_plane_get_property(struct drm_plane *plane, > *val = state->zpos; > } else if (plane->funcs->atomic_get_property) { > return plane->funcs->atomic_get_property(plane, state, property, val); > + } else if (property == config->plane_degamma_lut_property) { > + *val = (state->degamma_lut) ? > + state->degamma_lut->base.id : 0; > } else { > return -EINVAL; > } > @@ -944,6 +955,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p, > drm_printf(p, "\tcrtc-pos=" DRM_RECT_FMT "\n", DRM_RECT_ARG(&dest)); > drm_printf(p, "\tsrc-pos=" DRM_RECT_FP_FMT "\n", DRM_RECT_FP_ARG(&src)); > drm_printf(p, "\trotation=%x\n", state->rotation); > + drm_printf(p, "\tcolor_mgmt_changed=%d\n", state->color_mgmt_changed); > > if (plane->funcs->atomic_print_state) > plane->funcs->atomic_print_state(p, state); > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c > index ab4032167094c..d3eaf4d397681 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -3488,7 +3488,12 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, > drm_framebuffer_get(state->fb); > > state->fence = NULL; > + > state->commit = NULL; > + > + if (state->degamma_lut) > + drm_property_reference_blob(state->degamma_lut); > + state->color_mgmt_changed = false; > } > EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state); > > @@ -3533,6 +3538,8 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) > > if (state->commit) > drm_crtc_commit_put(state->commit); > + > + drm_property_unreference_blob(state->degamma_lut); > } > EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state); > > diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c > index e5c653357024d..7d8e74715b565 100644 > --- a/drivers/gpu/drm/drm_mode_config.c > +++ b/drivers/gpu/drm/drm_mode_config.c > @@ -348,6 +348,20 @@ static int drm_mode_create_standard_properties(struct drm_device *dev) > return -ENOMEM; > dev->mode_config.modifiers_property = prop; > > + prop = drm_property_create(dev, > + DRM_MODE_PROP_BLOB, > + "PLANE_DEGAMMA_LUT", 0); > + if (!prop) > + return -ENOMEM; > + dev->mode_config.plane_degamma_lut_property = prop; > + > + prop = drm_property_create_range(dev, > + DRM_MODE_PROP_IMMUTABLE, > + "PLANE_DEGAMMA_LUT_SIZE", 0, UINT_MAX); > + if (!prop) > + return -ENOMEM; > + dev->mode_config.plane_degamma_lut_size_property = prop; > + > return 0; > } > > diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h > index 2cb6f02df64ab..dcec93d062b4d 100644 > --- a/include/drm/drm_mode_config.h > +++ b/include/drm/drm_mode_config.h > @@ -724,6 +724,16 @@ struct drm_mode_config { > * the degamma LUT as supported by the driver (read-only). > */ > struct drm_property *degamma_lut_size_property; > + /** > + * @plane_degamma_lut_property: Optional Plane property to set the LUT > + * used to convert the framebuffer's colors to linear gamma. > + */ > + struct drm_property *plane_degamma_lut_property; > + /** > + * @plane_degamma_lut_size_property: Optional Plane property for the > + * size of the degamma LUT as supported by the driver (read-only). > + */ > + struct drm_property *plane_degamma_lut_size_property; > /** > * @ctm_property: Optional CRTC property to set the > * matrix used to convert colors after the lookup in the > diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h > index 8185e3468a231..2f8f5db77a406 100644 > --- a/include/drm/drm_plane.h > +++ b/include/drm/drm_plane.h > @@ -131,7 +131,17 @@ struct drm_plane_state { > */ > struct drm_crtc_commit *commit; > > + /* @degamma_lut: This isn't kerneldoc. Please build the docs using $ make htmldocs and make sure it's warning-free (for the files you're touching) and that the end result looks correct and has all the hyperlinks working and linking to the right places. Thanks, Daniel > + * > + * Lookup table for converting framebuffer pixel data before apply the > + * color conversion matrix @ctm. See drm_plane_enable_color_mgmt(). The > + * blob (if not NULL) is an array of &struct drm_color_lut. > + */ > + struct drm_property_blob *degamma_lut; > + > struct drm_atomic_state *state; > + > + bool color_mgmt_changed : 1; > }; > > static inline struct drm_rect > -- > 2.16.1.291.g4437f3f132-goog > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Thu, Feb 15, 2018 at 12:32:52AM -0500, Daniele Castagna wrote: > From: "uma.shankar at intel.com (Uma Shankar)" <uma.shankar@intel.com> > > Add Plane Degamma as a blob property and plane > degamma size as a range property. > > (am from https://patchwork.kernel.org/patch/10046515/) The discussion on this previous version has some feedback on using 32-bit values in the gamma lut instead of 16-bit. Have you considered this? > > Change-Id: Iaead6f944a8b677227d1be11169f46178de533b1 > Signed-off-by: Uma Shankar <uma.shankar at intel.com> > --- > drivers/gpu/drm/drm_atomic.c | 12 ++++++++++++ > drivers/gpu/drm/drm_atomic_helper.c | 7 +++++++ > drivers/gpu/drm/drm_mode_config.c | 14 ++++++++++++++ > include/drm/drm_mode_config.h | 10 ++++++++++ > include/drm/drm_plane.h | 10 ++++++++++ > 5 files changed, 53 insertions(+) > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c > index b76d49218cf1d..4a06ff2fd1a5e 100644 > --- a/drivers/gpu/drm/drm_atomic.c > +++ b/drivers/gpu/drm/drm_atomic.c > @@ -717,6 +717,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, > { > struct drm_device *dev = plane->dev; > struct drm_mode_config *config = &dev->mode_config; > + bool replaced = false; > + int ret; > > if (property == config->prop_fb_id) { > struct drm_framebuffer *fb = drm_framebuffer_lookup(dev, NULL, val); > @@ -762,6 +764,12 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, > } else if (plane->funcs->atomic_set_property) { > return plane->funcs->atomic_set_property(plane, state, > property, val); > + } else if (property == config->plane_degamma_lut_property) { > + ret = drm_atomic_replace_property_blob_from_id(dev, > + &state->degamma_lut, > + val, -1, &replaced); > + state->color_mgmt_changed |= replaced; > + return ret; > } else { > return -EINVAL; > } > @@ -820,6 +828,9 @@ drm_atomic_plane_get_property(struct drm_plane *plane, > *val = state->zpos; > } else if (plane->funcs->atomic_get_property) { > return plane->funcs->atomic_get_property(plane, state, property, val); > + } else if (property == config->plane_degamma_lut_property) { > + *val = (state->degamma_lut) ? > + state->degamma_lut->base.id : 0; > } else { > return -EINVAL; > } > @@ -944,6 +955,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p, > drm_printf(p, "\tcrtc-pos=" DRM_RECT_FMT "\n", DRM_RECT_ARG(&dest)); > drm_printf(p, "\tsrc-pos=" DRM_RECT_FP_FMT "\n", DRM_RECT_FP_ARG(&src)); > drm_printf(p, "\trotation=%x\n", state->rotation); > + drm_printf(p, "\tcolor_mgmt_changed=%d\n", state->color_mgmt_changed); > > if (plane->funcs->atomic_print_state) > plane->funcs->atomic_print_state(p, state); > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c > index ab4032167094c..d3eaf4d397681 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -3488,7 +3488,12 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, > drm_framebuffer_get(state->fb); > > state->fence = NULL; > + Extra line snuck in here > state->commit = NULL; > + > + if (state->degamma_lut) > + drm_property_reference_blob(state->degamma_lut); > + state->color_mgmt_changed = false; > } > EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state); > > @@ -3533,6 +3538,8 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) > > if (state->commit) > drm_crtc_commit_put(state->commit); > + > + drm_property_unreference_blob(state->degamma_lut); > } > EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state); > > diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c > index e5c653357024d..7d8e74715b565 100644 > --- a/drivers/gpu/drm/drm_mode_config.c > +++ b/drivers/gpu/drm/drm_mode_config.c > @@ -348,6 +348,20 @@ static int drm_mode_create_standard_properties(struct drm_device *dev) > return -ENOMEM; > dev->mode_config.modifiers_property = prop; > > + prop = drm_property_create(dev, > + DRM_MODE_PROP_BLOB, > + "PLANE_DEGAMMA_LUT", 0); > + if (!prop) > + return -ENOMEM; > + dev->mode_config.plane_degamma_lut_property = prop; > + > + prop = drm_property_create_range(dev, > + DRM_MODE_PROP_IMMUTABLE, > + "PLANE_DEGAMMA_LUT_SIZE", 0, UINT_MAX); > + if (!prop) > + return -ENOMEM; > + dev->mode_config.plane_degamma_lut_size_property = prop; Since these are optional, we probably want a helper for them which is only called if a plane wants to use them instead of always instantiating them. > + > return 0; > } > > diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h > index 2cb6f02df64ab..dcec93d062b4d 100644 > --- a/include/drm/drm_mode_config.h > +++ b/include/drm/drm_mode_config.h > @@ -724,6 +724,16 @@ struct drm_mode_config { > * the degamma LUT as supported by the driver (read-only). > */ > struct drm_property *degamma_lut_size_property; > + /** > + * @plane_degamma_lut_property: Optional Plane property to set the LUT > + * used to convert the framebuffer's colors to linear gamma. > + */ > + struct drm_property *plane_degamma_lut_property; > + /** > + * @plane_degamma_lut_size_property: Optional Plane property for the > + * size of the degamma LUT as supported by the driver (read-only). > + */ > + struct drm_property *plane_degamma_lut_size_property; Can we put these in drm_plane instead? If we do, we don't need the "plane_" prefix. > /** > * @ctm_property: Optional CRTC property to set the > * matrix used to convert colors after the lookup in the > diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h > index 8185e3468a231..2f8f5db77a406 100644 > --- a/include/drm/drm_plane.h > +++ b/include/drm/drm_plane.h > @@ -131,7 +131,17 @@ struct drm_plane_state { > */ > struct drm_crtc_commit *commit; > > + /* @degamma_lut: > + * > + * Lookup table for converting framebuffer pixel data before apply the > + * color conversion matrix @ctm. See drm_plane_enable_color_mgmt(). The > + * blob (if not NULL) is an array of &struct drm_color_lut. > + */ > + struct drm_property_blob *degamma_lut; > + > struct drm_atomic_state *state; > + > + bool color_mgmt_changed : 1; > }; > > static inline struct drm_rect > -- > 2.16.1.291.g4437f3f132-goog > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>-----Original Message----- >From: Sean Paul [mailto:seanpaul@chromium.org] >Sent: Tuesday, February 27, 2018 8:44 PM >To: Daniele Castagna <dcastagna@chromium.org> >Cc: dri-devel@lists.freedesktop.org; brian.starkey@arm.com; Shankar, Uma ><uma.shankar@intel.com> >Subject: Re: [PATCH 02/10] drm: Add Plane Degamma properties > >On Thu, Feb 15, 2018 at 12:32:52AM -0500, Daniele Castagna wrote: >> From: "uma.shankar at intel.com (Uma Shankar)" <uma.shankar@intel.com> >> >> Add Plane Degamma as a blob property and plane degamma size as a range >> property. >> >> (am from https://patchwork.kernel.org/patch/10046515/) > >The discussion on this previous version has some feedback on using 32-bit values >in the gamma lut instead of 16-bit. Have you considered this? > This needs to be modified. Will address this and send a next version. Kept it on hold since was trying to get a userspace implementation done. But, it's good to refresh the series addressing all the review comments. Thanks for the review Sean Paul. >> >> Change-Id: Iaead6f944a8b677227d1be11169f46178de533b1 >> Signed-off-by: Uma Shankar <uma.shankar at intel.com> >> --- >> drivers/gpu/drm/drm_atomic.c | 12 ++++++++++++ >> drivers/gpu/drm/drm_atomic_helper.c | 7 +++++++ >> drivers/gpu/drm/drm_mode_config.c | 14 ++++++++++++++ >> include/drm/drm_mode_config.h | 10 ++++++++++ >> include/drm/drm_plane.h | 10 ++++++++++ >> 5 files changed, 53 insertions(+) >> >> diff --git a/drivers/gpu/drm/drm_atomic.c >> b/drivers/gpu/drm/drm_atomic.c index b76d49218cf1d..4a06ff2fd1a5e >> 100644 >> --- a/drivers/gpu/drm/drm_atomic.c >> +++ b/drivers/gpu/drm/drm_atomic.c >> @@ -717,6 +717,8 @@ static int drm_atomic_plane_set_property(struct >> drm_plane *plane, { >> struct drm_device *dev = plane->dev; >> struct drm_mode_config *config = &dev->mode_config; >> + bool replaced = false; >> + int ret; >> >> if (property == config->prop_fb_id) { >> struct drm_framebuffer *fb = drm_framebuffer_lookup(dev, >NULL, >> val); @@ -762,6 +764,12 @@ static int drm_atomic_plane_set_property(struct >drm_plane *plane, >> } else if (plane->funcs->atomic_set_property) { >> return plane->funcs->atomic_set_property(plane, state, >> property, val); >> + } else if (property == config->plane_degamma_lut_property) { >> + ret = drm_atomic_replace_property_blob_from_id(dev, >> + &state->degamma_lut, >> + val, -1, &replaced); >> + state->color_mgmt_changed |= replaced; >> + return ret; >> } else { >> return -EINVAL; >> } >> @@ -820,6 +828,9 @@ drm_atomic_plane_get_property(struct drm_plane >*plane, >> *val = state->zpos; >> } else if (plane->funcs->atomic_get_property) { >> return plane->funcs->atomic_get_property(plane, state, >property, >> val); >> + } else if (property == config->plane_degamma_lut_property) { >> + *val = (state->degamma_lut) ? >> + state->degamma_lut->base.id : 0; >> } else { >> return -EINVAL; >> } >> @@ -944,6 +955,7 @@ static void drm_atomic_plane_print_state(struct >drm_printer *p, >> drm_printf(p, "\tcrtc-pos=" DRM_RECT_FMT "\n", >DRM_RECT_ARG(&dest)); >> drm_printf(p, "\tsrc-pos=" DRM_RECT_FP_FMT "\n", >DRM_RECT_FP_ARG(&src)); >> drm_printf(p, "\trotation=%x\n", state->rotation); >> + drm_printf(p, "\tcolor_mgmt_changed=%d\n", >> +state->color_mgmt_changed); >> >> if (plane->funcs->atomic_print_state) >> plane->funcs->atomic_print_state(p, state); diff --git >> a/drivers/gpu/drm/drm_atomic_helper.c >> b/drivers/gpu/drm/drm_atomic_helper.c >> index ab4032167094c..d3eaf4d397681 100644 >> --- a/drivers/gpu/drm/drm_atomic_helper.c >> +++ b/drivers/gpu/drm/drm_atomic_helper.c >> @@ -3488,7 +3488,12 @@ void >__drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, >> drm_framebuffer_get(state->fb); >> >> state->fence = NULL; >> + > >Extra line snuck in here > Will rectify this. >> state->commit = NULL; >> + >> + if (state->degamma_lut) >> + drm_property_reference_blob(state->degamma_lut); >> + state->color_mgmt_changed = false; >> } >> EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state); >> >> @@ -3533,6 +3538,8 @@ void >> __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) >> >> if (state->commit) >> drm_crtc_commit_put(state->commit); >> + >> + drm_property_unreference_blob(state->degamma_lut); >> } >> EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state); >> >> diff --git a/drivers/gpu/drm/drm_mode_config.c >> b/drivers/gpu/drm/drm_mode_config.c >> index e5c653357024d..7d8e74715b565 100644 >> --- a/drivers/gpu/drm/drm_mode_config.c >> +++ b/drivers/gpu/drm/drm_mode_config.c >> @@ -348,6 +348,20 @@ static int >drm_mode_create_standard_properties(struct drm_device *dev) >> return -ENOMEM; >> dev->mode_config.modifiers_property = prop; >> >> + prop = drm_property_create(dev, >> + DRM_MODE_PROP_BLOB, >> + "PLANE_DEGAMMA_LUT", 0); >> + if (!prop) >> + return -ENOMEM; >> + dev->mode_config.plane_degamma_lut_property = prop; >> + >> + prop = drm_property_create_range(dev, >> + DRM_MODE_PROP_IMMUTABLE, >> + "PLANE_DEGAMMA_LUT_SIZE", 0, UINT_MAX); >> + if (!prop) >> + return -ENOMEM; >> + dev->mode_config.plane_degamma_lut_size_property = prop; > >Since these are optional, we probably want a helper for them which is only called >if a plane wants to use them instead of always instantiating them. > Ok, will update this. >> + >> return 0; >> } >> >> diff --git a/include/drm/drm_mode_config.h >> b/include/drm/drm_mode_config.h index 2cb6f02df64ab..dcec93d062b4d >> 100644 >> --- a/include/drm/drm_mode_config.h >> +++ b/include/drm/drm_mode_config.h >> @@ -724,6 +724,16 @@ struct drm_mode_config { >> * the degamma LUT as supported by the driver (read-only). >> */ >> struct drm_property *degamma_lut_size_property; >> + /** >> + * @plane_degamma_lut_property: Optional Plane property to set the >LUT >> + * used to convert the framebuffer's colors to linear gamma. >> + */ >> + struct drm_property *plane_degamma_lut_property; >> + /** >> + * @plane_degamma_lut_size_property: Optional Plane property for the >> + * size of the degamma LUT as supported by the driver (read-only). >> + */ >> + struct drm_property *plane_degamma_lut_size_property; > >Can we put these in drm_plane instead? If we do, we don't need the "plane_" >prefix. > Yeah, will do that. >> /** >> * @ctm_property: Optional CRTC property to set the >> * matrix used to convert colors after the lookup in the diff --git >> a/include/drm/drm_plane.h b/include/drm/drm_plane.h index >> 8185e3468a231..2f8f5db77a406 100644 >> --- a/include/drm/drm_plane.h >> +++ b/include/drm/drm_plane.h >> @@ -131,7 +131,17 @@ struct drm_plane_state { >> */ >> struct drm_crtc_commit *commit; >> >> + /* @degamma_lut: >> + * >> + * Lookup table for converting framebuffer pixel data before apply the >> + * color conversion matrix @ctm. See drm_plane_enable_color_mgmt(). >The >> + * blob (if not NULL) is an array of &struct drm_color_lut. >> + */ >> + struct drm_property_blob *degamma_lut; >> + >> struct drm_atomic_state *state; >> + >> + bool color_mgmt_changed : 1; >> }; >> >> static inline struct drm_rect >> -- >> 2.16.1.291.g4437f3f132-goog >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > >-- >Sean Paul, Software Engineer, Google / Chromium OS
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index b76d49218cf1d..4a06ff2fd1a5e 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -717,6 +717,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, { struct drm_device *dev = plane->dev; struct drm_mode_config *config = &dev->mode_config; + bool replaced = false; + int ret; if (property == config->prop_fb_id) { struct drm_framebuffer *fb = drm_framebuffer_lookup(dev, NULL, val); @@ -762,6 +764,12 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, } else if (plane->funcs->atomic_set_property) { return plane->funcs->atomic_set_property(plane, state, property, val); + } else if (property == config->plane_degamma_lut_property) { + ret = drm_atomic_replace_property_blob_from_id(dev, + &state->degamma_lut, + val, -1, &replaced); + state->color_mgmt_changed |= replaced; + return ret; } else { return -EINVAL; } @@ -820,6 +828,9 @@ drm_atomic_plane_get_property(struct drm_plane *plane, *val = state->zpos; } else if (plane->funcs->atomic_get_property) { return plane->funcs->atomic_get_property(plane, state, property, val); + } else if (property == config->plane_degamma_lut_property) { + *val = (state->degamma_lut) ? + state->degamma_lut->base.id : 0; } else { return -EINVAL; } @@ -944,6 +955,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p, drm_printf(p, "\tcrtc-pos=" DRM_RECT_FMT "\n", DRM_RECT_ARG(&dest)); drm_printf(p, "\tsrc-pos=" DRM_RECT_FP_FMT "\n", DRM_RECT_FP_ARG(&src)); drm_printf(p, "\trotation=%x\n", state->rotation); + drm_printf(p, "\tcolor_mgmt_changed=%d\n", state->color_mgmt_changed); if (plane->funcs->atomic_print_state) plane->funcs->atomic_print_state(p, state); diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index ab4032167094c..d3eaf4d397681 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -3488,7 +3488,12 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, drm_framebuffer_get(state->fb); state->fence = NULL; + state->commit = NULL; + + if (state->degamma_lut) + drm_property_reference_blob(state->degamma_lut); + state->color_mgmt_changed = false; } EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state); @@ -3533,6 +3538,8 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) if (state->commit) drm_crtc_commit_put(state->commit); + + drm_property_unreference_blob(state->degamma_lut); } EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state); diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index e5c653357024d..7d8e74715b565 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -348,6 +348,20 @@ static int drm_mode_create_standard_properties(struct drm_device *dev) return -ENOMEM; dev->mode_config.modifiers_property = prop; + prop = drm_property_create(dev, + DRM_MODE_PROP_BLOB, + "PLANE_DEGAMMA_LUT", 0); + if (!prop) + return -ENOMEM; + dev->mode_config.plane_degamma_lut_property = prop; + + prop = drm_property_create_range(dev, + DRM_MODE_PROP_IMMUTABLE, + "PLANE_DEGAMMA_LUT_SIZE", 0, UINT_MAX); + if (!prop) + return -ENOMEM; + dev->mode_config.plane_degamma_lut_size_property = prop; + return 0; } diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index 2cb6f02df64ab..dcec93d062b4d 100644 --- a/include/drm/drm_mode_config.h +++ b/include/drm/drm_mode_config.h @@ -724,6 +724,16 @@ struct drm_mode_config { * the degamma LUT as supported by the driver (read-only). */ struct drm_property *degamma_lut_size_property; + /** + * @plane_degamma_lut_property: Optional Plane property to set the LUT + * used to convert the framebuffer's colors to linear gamma. + */ + struct drm_property *plane_degamma_lut_property; + /** + * @plane_degamma_lut_size_property: Optional Plane property for the + * size of the degamma LUT as supported by the driver (read-only). + */ + struct drm_property *plane_degamma_lut_size_property; /** * @ctm_property: Optional CRTC property to set the * matrix used to convert colors after the lookup in the diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index 8185e3468a231..2f8f5db77a406 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -131,7 +131,17 @@ struct drm_plane_state { */ struct drm_crtc_commit *commit; + /* @degamma_lut: + * + * Lookup table for converting framebuffer pixel data before apply the + * color conversion matrix @ctm. See drm_plane_enable_color_mgmt(). The + * blob (if not NULL) is an array of &struct drm_color_lut. + */ + struct drm_property_blob *degamma_lut; + struct drm_atomic_state *state; + + bool color_mgmt_changed : 1; }; static inline struct drm_rect