26 Sep, 2019

4 commits

  • If CRTC is active, we should send vblank event in vblank
    interrupt handler to make sure it's sent precisely. This
    patch caches the event to be sent at dpu_crtc->event in
    the ->atomic_enable() and the ->atomic_flush() callbacks
    and finally sends it out in dpu_vbl_irq_handler(). Since
    we rely on the interrupt handler to send the event, we
    call drm_crtc_vblank_get() to get a vblank refcount to
    guarantee the interrupt is enabled when caching the event
    in dpu_crtc_queue_state_event() and call drm_crtc_vblank_put()
    to drop a vblank refcount in the interrupt handler.

    Signed-off-by: Liu Ying
    (cherry picked from commit c5f325790615eb16fe5a448e4b0afa122a33c23e)

    Liu Ying
     
  • The DRM atomic core ensures crtc->state->event is not NULL when
    calling the ->atomic_disable() or the ->atomic_flush() callbacks.
    So, let's remove the unnecessary NULL check warning on it.

    Signed-off-by: Liu Ying
    (cherry picked from commit 834bff532fe22a79708459ec976da0a74a2e97e2)

    Liu Ying
     
  • When a full modeset is needed, the CRTC could be totally disabled or
    enabled/re-enabled after the modeset. If it's re-enabled, a vblank
    event would be sent during the CRTC enablement procedure. So, a bogus
    event should be killed in the ->atomic_disable() callback.

    Signed-off-by: Liu Ying
    (cherry picked from commit cee2d80af5e38fb022973c023f548ff02a515882)

    Liu Ying
     
  • The Kdoc for the event entry of struct drm_crtc_state mentions that the
    simplest way to send vblank event when a CRTC is being disabled is that
    calling drm_crtc_send_vblank_event() somewhen after drm_crtc_vblank_off()
    has been called. This patch takes the way mentioned above to send vblank
    event in the ->atomic_disable() callback.

    Signed-off-by: Liu Ying
    (cherry picked from commit 5b1a8127d98daf13d9f9891dfad2589f339b63d5)

    Liu Ying
     

23 Sep, 2019

3 commits


21 Sep, 2019

1 commit

  • As DPU fetchunits support ITU601(limited range)/ITU601_FR(full range)
    and ITU709(limited range) YUV to RGB color space conversions, we may
    add color encoding and color range properties support for planes.
    Considering software backward compatibility, the default color encoding
    is set to ITU601 with full color range.

    Signed-off-by: Liu Ying
    (cherry picked from commit f491e24e65cb360fb0b3ce56f74d04fd80da77ab)

    Liu Ying
     

20 Sep, 2019

7 commits

  • This patch adds mulitple pixel blend modes for DPU plane.
    The modes are "None", "Pre-multiplied" and "Coverage".

    Signed-off-by: Liu Ying
    (cherry picked from commit 1259fedbcf2a54f58b47e8531a09b35cc60a43f7)

    Liu Ying
     
  • Now that we've already got proper default blend mode support,
    we may introduce alpha in pixel feature for overlay planes.

    Signed-off-by: Liu Ying
    (cherry picked from commit 4881b188f809d1e3de8662dff94b1b2dfc00a62a)

    Liu Ying
     
  • DPU has no limitations on the plane's zpos, so we don't
    have to limit the primary plane zpos to be zero and the
    overlay plane zpos to be non-zero.

    Signed-off-by: Liu Ying
    (cherry picked from commit 4487aca4ab19623e1995322871e6f14d48bfef74)

    Liu Ying
     
  • This patch improves bailout path of dpu_plane_init().
    As we'll add more drm properties to the planes later,
    this would simply the code.

    Signed-off-by: Liu Ying
    (cherry picked from commit 1a6ab9246b5d6e71e8a4a0a0b5ea15d7af0c9879)

    Liu Ying
     
  • Without the new blend modes("None", "Pre-multiplied" and "Coverage")
    introduced in the below commit, the old userspace assumes alpha in
    pixel is per-premultiplied by default. So, let's support the default
    blend mode properly.

    commit 468dba6432ca ("drm: Add per-plane pixel blend mode property")

    Signed-off-by: Liu Ying
    (cherry picked from commit ebb7b4874493a8fb42de636e9421877a54399177)

    Liu Ying
     
  • Pixel blend modes represent the alpha blending equation
    selection, describing how the pixels from the current
    plane are composited with the background.

    Adds a pixel_blend_mode to drm_plane_state and a
    blend_mode_property to drm_plane, and related support
    functions.

    Defines three blend modes in drm_blend.h.

    Changes since v1:
    - Moves the blending equation into the DOC comment
    - Refines the comments of drm_plane_create_blend_mode_property to not
    enumerate the #defines, but instead the string values
    - Uses fg.* instead of pixel.* and plane_alpha instead of plane.alpha
    Changes since v2:
    - Refines the comments of drm_plane_create_blend_mode_property:
    1) Puts the descriptions (after the ":") on a new line
    2) Adds explaining why @supported_modes need PREMUL as default
    Changes since v3:
    - Refines drm_plane_create_blend_mode_property(). drm_property_add_enum()
    can calculate the index itself just fine, so no point in having the
    caller pass it in.
    - Since the current DRM assumption is that alpha is premultiplied
    as default, define DRM_MODE_BLEND_PREMULTI as 0 will be better.
    - Refines some comments.
    Changes since v4:
    - Adds comments in drm_blend.h.
    - Removes setting default value in drm_plane_create_blend_mode_property()
    as it is already in __drm_atomic_helper_plane_reset().
    - Fixes to use state->pixel_blend_mode instead of using
    plane->state->pixel_blend_mode in reset function.
    - Rebases on drm-misc-next.

    Reviewed-by: Liviu Dudau
    Signed-off-by: Lowry Li
    Signed-off-by: Ayan Kumar Halder
    Reviewed-by: Sean Paul
    Link: https://patchwork.freedesktop.org/patch/245734/
    (cherry picked from commit a5ec8332d4280500544e316f76c04a7adc02ce03)
    (cherry picked from commit 468dba6432ca97eedc2b8d6e6cc8905cd1e1f34e)

    Lowry Li
     
  • There are a lot of drivers that subclass drm_plane_state, all of them
    duplicate the code that links together the plane with plane_state.

    On top of that, drivers that enable core properties also have to
    duplicate the code for initializing the properties to their default
    values, which in all cases are the same as the defaults from core.

    Change since v1:
    - Make it consistent with the other helpers and require that both
    plane and state not be NULL, suggested by Boris Brezillon and
    Philipp Zabel.

    Reviewed-by: Laurent Pinchart
    Signed-off-by: Alexandru Gheorghe
    Reviewed-by: Philipp Zabel
    Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-2-alexandru-cosmin.gheorghe@arm.com
    (cherry picked from commit 7f4de521001f4ea705d505c9f91f58d0f56a0e6d)
    (cherry picked from commit f09b192bf1316f0e65fa2dbb5ba4c82a558867ae)

    Alexandru Gheorghe
     

17 Sep, 2019

1 commit

  • Problems:
    - GPU hang when run Google Earth apk on 8MM EVK board
    - Android DEQP/SKQP CTS have random failures
    - Khronos ES20 CTS have random failures

    Analysis:
    GPU got stuck in shader module when process specific data format,
    this is caused by VSI GCNanoUltra Errata(HBN1286), which does not set
    the specific intermediate register to 0 in hardware reset sequence after power up,
    this wrong register will cause the unexpected result when process specific data type,
    wrong behavior will happen and may cause out of bound access in shader programming.

    Fix:
    GPU driver will submit the predefined command(dummy draw) with fake stream and shader,
    also set scissor with (0,0,0,0) to avoid draw out, no pixel output on hardware pipeline,
    this workaround can set the specific register to 0 as the effective SW remedy.

    Impact:
    No obvious functionality and performance impact with dummy draw workaround,
    it only takes several cycles in command fetch --> vertex shader --> primitive,
    and then cull out of reset of GPU pipelines.

    This patch can fix the same GPU problem for 7ULP.

    Signed-off-by: Xianzhong
    (cherry picked from commit b14813c419b1f733c0945e99fc403b7a25774d24)

    Xianzhong
     

16 Sep, 2019

2 commits

  • The CRTC background should be full screen instead of partial
    screen, because the DRM core is likely to add configurable
    background color support in the future. We may cover the full
    screen with ConstFrame0/1, upon which builds planes. With this,
    it is easier to compute each plane's layer offset vs CRTC start
    point and all ConstFrame units can be controlled by CRTC.

    Signed-off-by: Liu Ying
    (cherry picked from commit ba18a9874cf010032413ca70f9b358399a143037)

    Liu Ying
     
  • By correcting plane's ExtDst source in ->atomic_begin() for
    cases where pixel combiner is used, commit[1] acctually fixes
    the primary plane on-the-fly disablement failure issue which
    commit[2] tries to address. So, let's revert commit[2] and
    allow primary plane on-the-fly disablement.

    [1] commit 2f3eaadf72c3 ("MLK-22584 drm/imx: dpu: crtc: Correct plane's ExtDst source in ->atomic_begin()")
    [2] commit 6477bb1492b7 ("MLK-21525 drm/imx: dpu: kms: Disallow primary plane on-the-fly disablement")

    Revert "MLK-21525 drm/imx: dpu: kms: Disallow primary plane on-the-fly disablement"

    This reverts commit 6477bb1492b7ac89678891447f3d794e4fdb6df6.

    Signed-off-by: Liu Ying
    (cherry picked from commit 148075a270dafa0a04f1c9b61d62e2764e469cf3)

    Liu Ying
     

12 Sep, 2019

6 commits

  • Change DMA_BUF_IOCTL_PHYS NR to 10 avoid conflicts with upstream
    in the future.

    Reviewed-by: Song Bing
    Signed-off-by: Dong Aisheng
    (cherry picked from commit 36abba8f55078424e037e7f7877e9f22062cccbc)

    Dong Aisheng
     
  • change DRM_FORMAT_MOD_VENDOR_VSI to 0xf1 to avoid conflicts
    with upstream in the future.

    Reviewed-by: Liu Ying
    Signed-off-by: Dong Aisheng
    (cherry picked from commit aa4bedcc4c316d8d9400c3709840d5622e64e9b8)

    Dong Aisheng
     
  • change DRM_FORMAT_MOD_VENDOR_AMPHION to 0xf0 to avoid conflicts
    with upstream in the future.

    Reviewed-by: Liu Ying
    Signed-off-by: Dong Aisheng
    (cherry picked from commit c91d6eb654f557f683e5cdd44181581adbe15378)

    Dong Aisheng
     
  • In dpu_helper_funcs->atomic_begin(), we temporarily set the plane's
    ExtDst source to ConstFrame in shadow. In the plane driver,
    dpu_plane_helper_funcs->atomic_update() can update the shadow if
    necessary. This way, we may set the source as either ConstFrame
    or LayerBlend. We only set the source for the old top plane in
    ->atomic_begin(). However, in cases where pixel combiner is used,
    the top planes are tracked separately for the master stream and
    the slave stream with ->is_left_top or ->is_right_top flags
    instead of ->is_top flag when pixel combiner is not used. This
    patch corrects the source for the cases where pixel combiner is
    used.

    Signed-off-by: Liu Ying
    (cherry picked from commit ff19118af177bab2dc765b242cf5b4392910a5e7)

    Liu Ying
     
  • The bit DIV0 of register STORE9_STATIC is used as a control bit
    to fix the unsynchronization issue bewteen two display streams
    in FrameGen side-by-side mode, which is introduced from an ECO
    operation for the display controller. The bit has to be one
    when the side-by-side mode is enabled. And, it has to be zero
    when the mode is disabled, otherwise, a single display stream
    cannot startup correctly. Since the DPU common driver initializes
    the register for us at the driver probe stage and system resume
    stage, we may remove the same initialization logic of our own.
    Without this patch, as the DPU blit engine DRM driver is resumed
    relatively late, the bit would be overwritten to be zero at the
    driver's ->resume() callback, which causes the display controller
    cannot be correctly resumed from FrameGen side-by-side mode and
    content ExtDst shadow load done event from the slave stream won't
    come.

    Signed-off-by: Liu Ying
    (cherry picked from commit 785a8705624e114f4f3d3d0836826130fb57b46f)

    Liu Ying
     
  • The bit DIV0 of register STORE9_STATIC is used as a control bit
    to fix the unsynchronization issue bewteen two display streams
    in FrameGen side-by-side mode, which is introduced from an ECO
    operation for the display controller. The bit has to be one
    when the side-by-side mode is enabled. And, it has to be zero
    when the mode is disabled, otherwise, a single display stream
    cannot startup correctly. As Store9 is a part of blit engine,
    the rest bits of the register should also be initialized before
    any regular blit. Currently, we need to do the initialization
    at driver probe stage and system resume stage at least. Since
    we have the DPU KMS driver and DPU blit engine DRM driver, the
    initialization needs to be done only in the DPU common driver
    so that the register won't be overwritten accidentally by the
    two drivers with each other. We see the overwriting issue at
    the system resume stage because the blit engine driver resumes
    relatively late and it initializes the register blindly by
    writing the bit to zero, thus the display controller cannot be
    resumed correctly in FrameGen side-by-side mode and content
    ExtDst shadow load done event from the slave stream won't come.

    Signed-off-by: Liu Ying
    (cherry picked from commit e90a6a917e3f5d7087e0de5616b6e8a055906767)

    Liu Ying
     

11 Sep, 2019

2 commits


10 Sep, 2019

3 commits


06 Sep, 2019

9 commits

  • [ Upstream commit e858faf556d4e14c750ba1e8852783c6f9520a0e ]

    If an app is playing tricks to reuse a socket via tcp_disconnect(),
    bytes_acked/received needs to be reset to 0. Otherwise tcp_info will
    report the sum of the current and the old connection..

    Cc: Eric Dumazet
    Fixes: 0df48c26d841 ("tcp: add tcpi_bytes_acked to tcp_info")
    Fixes: bdd1f9edacb5 ("tcp: add tcpi_bytes_received to tcp_info")
    Signed-off-by: Christoph Paasch
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit 1b200acde418f4d6d87279d3f6f976ebf188f272)

    Christoph Paasch
     
  • [ Upstream commit 8d650cdedaabb33e85e9b7c517c0c71fcecc1de9 ]

    Neal reported incorrect use of ns_capable() from bpf hook.

    bpf_setsockopt(...TCP_CONGESTION...)
    -> tcp_set_congestion_control()
    -> ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)
    -> ns_capable_common()
    -> current_cred()
    -> rcu_dereference_protected(current->cred, 1)

    Accessing 'current' in bpf context makes no sense, since packets
    are processed from softirq context.

    As Neal stated : The capability check in tcp_set_congestion_control()
    was written assuming a system call context, and then was reused from
    a BPF call site.

    The fix is to add a new parameter to tcp_set_congestion_control(),
    so that the ns_capable() call is only performed under the right
    context.

    Fixes: 91b5b21c7c16 ("bpf: Add support for changing congestion control")
    Signed-off-by: Eric Dumazet
    Cc: Lawrence Brakmo
    Reported-by: Neal Cardwell
    Acked-by: Neal Cardwell
    Acked-by: Lawrence Brakmo
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit c60f57dfe995172c2f01e59266e3ffa3419c6cd9)

    Eric Dumazet
     
  • [ Upstream commit b617158dc096709d8600c53b6052144d12b89fab ]

    Some applications set tiny SO_SNDBUF values and expect
    TCP to just work. Recent patches to address CVE-2019-11478
    broke them in case of losses, since retransmits might
    be prevented.

    We should allow these flows to make progress.

    This patch allows the first and last skb in retransmit queue
    to be split even if memory limits are hit.

    It also adds the some room due to the fact that tcp_sendmsg()
    and tcp_sendpage() might overshoot sk_wmem_queued by about one full
    TSO skb (64KB size). Note this allowance was already present
    in stable backports for kernels < 4.15

    Note for < 4.15 backports :
    tcp_rtx_queue_tail() will probably look like :

    static inline struct sk_buff *tcp_rtx_queue_tail(const struct sock *sk)
    {
    struct sk_buff *skb = tcp_send_head(sk);

    return skb ? tcp_write_queue_prev(sk, skb) : tcp_write_queue_tail(sk);
    }

    Fixes: f070ef2ac667 ("tcp: tcp_fragment() should apply sane memory limits")
    Signed-off-by: Eric Dumazet
    Reported-by: Andrew Prout
    Tested-by: Andrew Prout
    Tested-by: Jonathan Lemon
    Tested-by: Michal Kubecek
    Acked-by: Neal Cardwell
    Acked-by: Yuchung Cheng
    Acked-by: Christoph Paasch
    Cc: Jonathan Looney
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit 6323c238bb4374d1477348cfbd5854f2bebe9a21)

    Eric Dumazet
     
  • commit b6653b3629e5b88202be3c9abc44713973f5c4b4 upstream.

    tcp_fragment() might be called for skbs in the write queue.

    Memory limits might have been exceeded because tcp_sendmsg() only
    checks limits at full skb (64KB) boundaries.

    Therefore, we need to make sure tcp_fragment() wont punish applications
    that might have setup very low SO_SNDBUF values.

    Fixes: f070ef2ac667 ("tcp: tcp_fragment() should apply sane memory limits")
    Signed-off-by: Eric Dumazet
    Reported-by: Christoph Paasch
    Tested-by: Christoph Paasch
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    (cherry picked from commit dad3a9314ac95dedc007bc7dacacb396ea10e376)

    Eric Dumazet
     
  • commit 967c05aee439e6e5d7d805e195b3a20ef5c433d6 upstream.

    If mtu probing is enabled tcp_mtu_probing() could very well end up
    with a too small MSS.

    Use the new sysctl tcp_min_snd_mss to make sure MSS search
    is performed in an acceptable range.

    CVE-2019-11479 -- tcp mss hardcoded to 48

    Signed-off-by: Eric Dumazet
    Reported-by: Jonathan Lemon
    Cc: Jonathan Looney
    Acked-by: Neal Cardwell
    Cc: Yuchung Cheng
    Cc: Tyler Hicks
    Cc: Bruce Curtis
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit 59222807fcc99951dc769cd50e132e319d73d699)

    Eric Dumazet
     
  • commit 5f3e2bf008c2221478101ee72f5cb4654b9fc363 upstream.

    Some TCP peers announce a very small MSS option in their SYN and/or
    SYN/ACK messages.

    This forces the stack to send packets with a very high network/cpu
    overhead.

    Linux has enforced a minimal value of 48. Since this value includes
    the size of TCP options, and that the options can consume up to 40
    bytes, this means that each segment can include only 8 bytes of payload.

    In some cases, it can be useful to increase the minimal value
    to a saner value.

    We still let the default to 48 (TCP_MIN_SND_MSS), for compatibility
    reasons.

    Note that TCP_MAXSEG socket option enforces a minimal value
    of (TCP_MIN_MSS). David Miller increased this minimal value
    in commit c39508d6f118 ("tcp: Make TCP_MAXSEG minimum more correct.")
    from 64 to 88.

    We might in the future merge TCP_MIN_SND_MSS and TCP_MIN_MSS.

    CVE-2019-11479 -- tcp mss hardcoded to 48

    Signed-off-by: Eric Dumazet
    Suggested-by: Jonathan Looney
    Acked-by: Neal Cardwell
    Cc: Yuchung Cheng
    Cc: Tyler Hicks
    Cc: Bruce Curtis
    Cc: Jonathan Lemon
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit 7f9f8a37e563c67b24ccd57da1d541a95538e8d9)

    Eric Dumazet
     
  • commit f070ef2ac66716357066b683fb0baf55f8191a2e upstream.

    Jonathan Looney reported that a malicious peer can force a sender
    to fragment its retransmit queue into tiny skbs, inflating memory
    usage and/or overflow 32bit counters.

    TCP allows an application to queue up to sk_sndbuf bytes,
    so we need to give some allowance for non malicious splitting
    of retransmit queue.

    A new SNMP counter is added to monitor how many times TCP
    did not allow to split an skb if the allowance was exceeded.

    Note that this counter might increase in the case applications
    use SO_SNDBUF socket option to lower sk_sndbuf.

    CVE-2019-11478 : tcp_fragment, prevent fragmenting a packet when the
    socket is already using more than half the allowed space

    Signed-off-by: Eric Dumazet
    Reported-by: Jonathan Looney
    Acked-by: Neal Cardwell
    Acked-by: Yuchung Cheng
    Reviewed-by: Tyler Hicks
    Cc: Bruce Curtis
    Cc: Jonathan Lemon
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit ec83921899a571ad70d582934ee9e3e07f478848)

    Eric Dumazet
     
  • commit 3b4929f65b0d8249f19a50245cd88ed1a2f78cff upstream.

    Jonathan Looney reported that TCP can trigger the following crash
    in tcp_shifted_skb() :

    BUG_ON(tcp_skb_pcount(skb) < pcount);

    This can happen if the remote peer has advertized the smallest
    MSS that linux TCP accepts : 48

    An skb can hold 17 fragments, and each fragment can hold 32KB
    on x86, or 64KB on PowerPC.

    This means that the 16bit witdh of TCP_SKB_CB(skb)->tcp_gso_segs
    can overflow.

    Note that tcp_sendmsg() builds skbs with less than 64KB
    of payload, so this problem needs SACK to be enabled.
    SACK blocks allow TCP to coalesce multiple skbs in the retransmit
    queue, thus filling the 17 fragments to maximal capacity.

    CVE-2019-11477 -- u16 overflow of TCP_SKB_CB(skb)->tcp_gso_segs

    Fixes: 832d11c5cd07 ("tcp: Try to restore large SKBs while SACK processing")
    Signed-off-by: Eric Dumazet
    Reported-by: Jonathan Looney
    Acked-by: Neal Cardwell
    Reviewed-by: Tyler Hicks
    Cc: Yuchung Cheng
    Cc: Bruce Curtis
    Cc: Jonathan Lemon
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit c09be31461ed140976c60a87364415454a2c3d42)

    Eric Dumazet
     
  • [ Upstream commit 50ce163a72d817a99e8974222dcf2886d5deb1ae ]

    For some reason, tcp_grow_window() correctly tests if enough room
    is present before attempting to increase tp->rcv_ssthresh,
    but does not prevent it to grow past tcp_space()

    This is causing hard to debug issues, like failing
    the (__tcp_select_window(sk) >= tp->rcv_wnd) test
    in __tcp_ack_snd_check(), causing ACK delays and possibly
    slow flows.

    Depending on tcp_rmem[2], MTU, skb->len/skb->truesize ratio,
    we can see the problem happening on "netperf -t TCP_RR -- -r 2000,2000"
    after about 60 round trips, when the active side no longer sends
    immediate acks.

    This bug predates git history.

    Signed-off-by: Eric Dumazet
    Acked-by: Soheil Hassas Yeganeh
    Acked-by: Neal Cardwell
    Acked-by: Wei Wang
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman
    (cherry picked from commit 6728c6174a47b8a04ceec89aca9e1195dee7ff6b)

    Eric Dumazet
     

05 Sep, 2019

1 commit

  • Patch moves some decoding functions from driver/usb/dwc3/debug.h driver
    to driver/usb/common/debug.c file. These moved functions include:
    dwc3_decode_get_status
    dwc3_decode_set_clear_feature
    dwc3_decode_set_address
    dwc3_decode_get_set_descriptor
    dwc3_decode_get_configuration
    dwc3_decode_set_configuration
    dwc3_decode_get_intf
    dwc3_decode_set_intf
    dwc3_decode_synch_frame
    dwc3_decode_set_sel
    dwc3_decode_set_isoch_delay
    dwc3_decode_ctrl

    These functions are used also in inroduced cdns3 driver.

    All functions prefixes were changed from dwc3 to usb.
    Also, function's parameters has been extended according to the name
    of fields in standard SETUP packet.
    Additionally, patch adds usb_decode_ctrl function to
    include/linux/usb/ch9.h file.

    Signed-off-by: Pawel Laszczak
    (cherry picked from commit 046b47df488c6956b9a4420e684274cc0ca0fb70)
    Signed-off-by: Leonard Crestez
    Reviewed-by: Peter Chen

    Pawel Laszczak
     

30 Aug, 2019

1 commit

  • When GST receives V4L2_EVENT_SOURCE_CHANGE, it calls g_fmt ioctl and
    expects that the driver will report the pixel format.
    So far, the driver was unable to distinguish, by looking at the jpeg
    SOF marker, if an image is YUV444 or RGB24, both have 3 color components
    and no subsampling.
    Consider the colorspace is RGB if the transform flag from APP14 marker
    segment has the value 0, in mxc_jpeg_parse, if needed, update the pixel
    format from yuv444 to rgb24.

    Signed-off-by: Mirela Rabulea
    Reviewed-by: Robert Chiras

    Mirela Rabulea