Commit Graph

798814 Commits

Author SHA1 Message Date
Shashank Babu Chinta Venkata
3c8a7d12de ANDROID: driver: gpu: drm: add notifier for panel related events
Add support for notfier of panel blank/unblank events.
This allows external drivers such as touch, backlight
drivers etc to subscribe to panel related events.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: I3ac644c1c931b959a511ee4a999a417a4b7bdcd1
2020-04-16 00:20:17 +00:00
Shashank Babu Chinta Venkata
580ab00497 ANDROID: include: drm: support unicasting mipi cmds to dsi ctrls
Add support into the drm_mipi_dsi framework to support
unicasting DCS commands to specific DSI controls within a panel.
This is required for partial update where region of interest
spans only on one controller in a dual controller configuration.
Also, Some display panel have the requirement of waiting for certain
duration before dsi host can read back the response from panel during
a DCS read command. This change adds the support to store
the delay required in dsi message structure.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: I3a99437441410a2514f9486d08ae3ba68670769e
2020-04-16 00:20:09 +00:00
Shashank Babu Chinta Venkata
d4d0146ef6 ANDROID: include: drm: increase DRM max property count to 64
Increase drm property count from 24 to 64 to make
room for custom properties of drm plane and drm
crtc objects.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: I3e42c1fc684d7d7cea828fc35b96673bdef598f4
2020-04-16 00:19:48 +00:00
Uma Shankar
6f72e5e9ea BACKPORT: drm: Add HDMI colorspace property
Create a new connector property to program colorspace to sink
devices. Modern sink devices support more than 1 type of
colorspace like 601, 709, BT2020 etc. This helps to switch
based on content type which is to be displayed. The decision
lies with compositors as to in which scenarios, a particular
colorspace will be picked.

This will be helpful mostly to switch to higher gamut colorspaces
like BT2020 when the media content is encoded as BT2020. Thereby
giving a good visual experience to users.

The expectation from userspace is that it should parse the EDID
and get supported colorspaces. Use this property and switch to the
one supported. Sink supported colorspaces should be retrieved by
userspace from EDID and driver will not explicitly expose them.

Basically the expectation from userspace is:
 - Set up CRTC DEGAMMA/CTM/GAMMA to convert to some sink
   colorspace
 - Set this new property to let the sink know what it
   converted the CRTC output to.

v2: Addressed Maarten and Ville's review comments. Enhanced
the colorspace enum to incorporate both HDMI and DP supported
colorspaces. Also, added a default option for colorspace.

v3: Removed Adobe references from enum definitions as per
Ville, Hans Verkuil and Jonas Karlman suggestions. Changed
Default to an unset state where driver will assign the colorspace
is not chosen by user, suggested by Ville and Maarten. Addressed
other misc review comments from Maarten. Split the changes to
have separate colorspace property for DP and HDMI.

v4: Addressed Chris and Ville's review comments, and created a
common colorspace property for DP and HDMI, filtered the list
based on the colorspaces supported by the respective protocol
standard.

v5: Made the property creation helper accept enum list based on
platform capabilties as suggested by Shashank. Consolidated HDMI
and DP property creation in the common helper.

v6: Addressed Shashank's review comments.

v7: Added defines instead of enum in uapi as per Brian Starkey's
suggestion in order to go with string matching at userspace. Updated
the commit message to add more details as well kernel docs.

v8: Addressed Maarten's review comments.

v9: Removed macro defines from uapi as per Brian Starkey and Daniel
Stone's comments and moved to drm include file. Moved back to older
design with exposing all HDMI colorspaces to userspace since infoframe
capability is there even on legacy platforms, as per Ville's review
comments.

v10: Fixed sparse warnings, updated the RB from Maarten and Jani's ack.

v11: Addressed Ville's review comments. Updated the Macro naming and
added DCI-P3 colorspace as well, defined in CTA 861.G spec.

v12: Appended BT709 and SMPTE 170M with YCC information as per Ville's
review comment to be clear and not to be confused with RGB.

v13: Reorder the colorspace macros.

v14: Removed DP as of now, will be added later once full support is
enabled, as per Ville's suggestion. Added Ville's RB.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1550596381-993-2-git-send-email-uma.shankar@intel.com
(cherry picked from commit d2c6a40584)
[adelva: drm_atomic_uapi.c -> drm_atomic.c as part of 4.19 backport]
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I3f0ed13c513efc5d77f458d98f820d071a8a3a09
2020-04-16 00:19:31 +00:00
Shashank Babu Chinta Venkata
f309826261 ANDROID: drm: edid: add support for additional CEA extension blocks
Add support for parsing additional cea extension blocks
such as CEA HDR metadata block, VCDB block, Colorimetry
data block and VSVDB.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: Iae84749b816cd8bc0f598654c018cde475a31df9
2020-04-16 00:19:22 +00:00
Uma Shankar
1e98c11549 BACKPORT: drm: Parse HDR metadata info from EDID
HDR metadata block is introduced in CEA-861.3 spec.
Parsing the same to get the panel's HDR metadata.

v2: Rebase and added Ville's POC changes to the patch.

v3: No Change

v4: Addressed Shashank's review comments

v5: Addressed Shashank's comment and added his RB.

v6: Addressed Jonas Karlman review comments.

v7: Adressed Ville's review comments and fixed the issue
with length handling.

v8: Put the length check as per the convention followed in
existing code, as suggested by Ville.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-4-git-send-email-uma.shankar@intel.com
(cherry picked from commit e85959d6cb)
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ie6a5f4d456109486118d148767239f455e4003c3
2020-04-16 00:19:13 +00:00
Uma Shankar
4ae8f7c45a BACKPORT: drm: Add HDR source metadata property
This patch adds a blob property to get HDR metadata
information from userspace. This will be send as part
of AVI Infoframe to panel.

It also implements get() and set() functions for HDR output
metadata property.The blob data is received from userspace and
saved in connector state, the same is returned as blob in get
property call to userspace.

v2: Rebase and modified the metadata structure elements
as per Ville's POC changes.

v3: No Change

v4: Addressed Shashank's review comments

v5: Rebase.

v6: Addressed Brian Starkey's review comments, defined
new structure with header for dynamic metadata scalability.
Merge get/set property functions for metadata in this patch.

v7: Addressed Jonas Karlman review comments and defined separate
structure for infoframe to better align with CTA 861.G spec. Added
Shashank's RB.

v8: Addressed Ville's review comments. Moved sink metadata structure
out of uapi headers as suggested by Jonas Karlman.

v9: Rebase and addressed Jonas Karlman review comments.

v10: Addressed Ville's review comments, dropped the metdata_changed
state variable as its not needed anymore.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-2-git-send-email-uma.shankar@intel.com
(cherry picked from commit fbb5d0353c)
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ifa4950c6d27a9652fa91f1913cb145be0d555ae4
2020-04-16 00:18:55 +00:00
David Francis
e8fa1d61f2 BACKPORT: drm/dp_mst: Parse FEC capability on MST ports
As of DP1.4, ENUM_PATH_RESOURCES returns a bit indicating
if FEC can be supported up to that point in the MST network.

The bit is the first byte of the ENUM_PATH_RESOURCES ack reply,
bottom-most bit (refer to section 2.11.9.4 of DP standard,
v1.4)

That value is needed for FEC and DSC support

Store it on drm_dp_mst_port

Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: David Francis <David.Francis@amd.com>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a3c2b0ffc0)
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ie5b5d16aec40b36e58fda0d1a8aa58aa85fdd984
2020-04-16 00:18:38 +00:00
Alistair Delva
8ee63850d8 ANDROID: GKI: ABI update for DRM changes
Leaf changes summary: 119 artifacts changed
Changed leaf types summary: 12 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 4 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 103 Added variables

4 Added functions:

  [A] 'function int drm_mode_create_colorspace_property(drm_connector*)'
  [A] 'function int drm_panel_notifier_call_chain(drm_panel*, unsigned long int, void*)'
  [A] 'function int drm_panel_notifier_register(drm_panel*, notifier_block*)'
  [A] 'function int drm_panel_notifier_unregister(drm_panel*, notifier_block*)'

103 Added variables:

  [A] 'cpumask __cpu_isolated_mask'
  [A] 'cpumask __cpu_online_mask'
  [A] 'cpumask __cpu_possible_mask'
  [A] 'cpumask __cpu_present_mask'
  [A] 'unsigned long int __per_cpu_offset[32]'
  [A] 'unsigned long int __stack_chk_guard'
  [A] 'tracepoint __tracepoint_clock_set_rate'
  [A] 'tracepoint __tracepoint_dma_fence_emit'
  [A] 'tracepoint __tracepoint_smmu_init'
  [A] 'tracepoint __tracepoint_tlbi_end'
  [A] 'tracepoint __tracepoint_tlbi_start'
  [A] 'tracepoint __tracepoint_tlbsync_timeout'
  [A] 'tracepoint __tracepoint_xdp_exception'
  [A] 'const unsigned char _ctype[256]'
  [A] 'bus_type amba_bustype'
  [A] 'void ()* arch_read_hardware_id'
  [A] 'static_key_false arch_timer_read_ool_enabled'
  [A] 'static_key_false arm64_const_caps_ready'
  [A] 'void ()* arm_pm_restart'
  [A] 'u32 audit_enabled'
  [A] 'unsigned int boot_reason'
  [A] 'br_should_route_hook_t* br_should_route_hook'
  [A] 'const clk_ops clk_fixed_factor_ops'
  [A] 'const clk_ops clk_fixed_rate_ops'
  [A] 'unsigned int cold_boot'
  [A] 'pglist_data contig_page_data'
  [A] 'const unsigned long int cpu_bit_bitmap[65][1]'
  [A] 'static_key_false cpu_hwcap_keys[62]'
  [A] 'unsigned long int cpu_hwcaps[1]'
  [A] 'int cpu_number'
  [A] 'bus_type cpu_subsys'
  [A] 'cpu_topology cpu_topology[32]'
  [A] 'freq_attr cpufreq_freq_attr_scaling_available_freqs'
  [A] 'freq_attr cpufreq_freq_attr_scaling_boost_freqs'
  [A] 'freq_attr* cpufreq_generic_attr[2]'
  [A] 'cpuidle_device cpuidle_dev'
  [A] 'const skb_checksum_ops* crc32c_csum_stub'
  [A] 'const u16 crc_ccitt_table[256]'
  [A] 'const crypto_type crypto_ablkcipher_type'
  [A] 'const crypto_type crypto_ahash_type'
  [A] 'cma* dma_contiguous_default_area'
  [A] 'const dma_fence_ops dma_fence_array_ops'
  [A] 'void ()* do_tlb_conf_fault_cb'
  [A] 'unsigned int drm_debug'
  [A] 'const dma_map_ops dummy_dma_ops'
  [A] 'flow_dissector flow_keys_basic_dissector'
  [A] 'bio_set fs_bio_set'
  [A] 'const icmp_err icmp_err_convert[16]'
  [A] 'net init_net'
  [A] 'uts_namespace init_uts_ns'
  [A] 'resource iomem_resource'
  [A] 'kobject* kernel_kobj'
  [A] 'u64 kimage_voffset'
  [A] 'kmem_cache* kmalloc_caches[2][14]'
  [A] 'const char linux_banner[382]'
  [A] 's64 memstart_addr'
  [A] 'unsigned long int mmap_min_addr'
  [A] 'kset* module_kset'
  [A] 'kobj_type module_ktype'
  [A] 'const nf_br_ops* nf_br_ops'
  [A] 'static_key nf_hooks_needed[13][5]'
  [A] 'const nf_ipv6_ops* nf_ipv6_ops'
  [A] 'unsigned int nr_cpu_ids'
  [A] 'atomic_long_t nr_swap_pages'
  [A] 'const fwnode_operations of_fwnode_ops'
  [A] 'int overflowuid'
  [A] 'atomic_notifier_head panic_notifier_list'
  [A] 'int panic_timeout'
  [A] 'const kernel_param_ops param_ops_bint'
  [A] 'const kernel_param_ops param_ops_bool'
  [A] 'const kernel_param_ops param_ops_byte'
  [A] 'const kernel_param_ops param_ops_charp'
  [A] 'const kernel_param_ops param_ops_int'
  [A] 'const kernel_param_ops param_ops_long'
  [A] 'const kernel_param_ops param_ops_string'
  [A] 'const kernel_param_ops param_ops_uint'
  [A] 'bus_type pci_bus_type'
  [A] 'int percpu_counter_batch'
  [A] 'bus_type platform_bus_type'
  [A] 'bool pm_freezing'
  [A] 'void ()* pm_power_off'
  [A] 'kobject* power_kobj'
  [A] 'ww_class reservation_ww_class'
  [A] 'static_key rfs_needed'
  [A] 'u32 rps_cpu_mask'
  [A] 'rps_sock_flow_table* rps_sock_flow_table'
  [A] 'char* saved_command_line'
  [A] 'const snd_pcm_chmap_elem snd_pcm_alt_chmaps[6]'
  [A] 'const snd_pcm_chmap_elem snd_pcm_std_chmaps[6]'
  [A] 'const dev_pm_ops snd_soc_pm_ops'
  [A] 'timezone sys_tz'
  [A] 'workqueue_struct* system_freezable_wq'
  [A] 'atomic_t system_freezing_cnt'
  [A] 'workqueue_struct* system_highpri_wq'
  [A] 'workqueue_struct* system_long_wq'
  [A] 'system_states system_state'
  [A] 'workqueue_struct* system_unbound_wq'
  [A] 'workqueue_struct* system_wq'
  [A] 'const arch_timer_erratum_workaround* timer_unstable_counter_workaround'
  [A] 'unsigned long int totalram_pages'
  [A] 'const v4l2_file_operations v4l2_subdev_fops'
  [A] 'const vb2_mem_ops vb2_vmalloc_memops'
  [A] 'void ()* vendor_panic_cb'

'struct drm_connector at drm_connector.h:781:1' changed:
  type size changed from 8448 to 14464 (in bits)
  20 data member insertions:
    'drm_property* drm_connector::colorspace_property', at offset 11136 (in bits) at drm_connector.h:965:1
    'u8 drm_connector::pt_scan_info', at offset 13088 (in bits) at drm_connector.h:1079:1
    'u8 drm_connector::it_scan_info', at offset 13096 (in bits) at drm_connector.h:1080:1
    'u8 drm_connector::ce_scan_info', at offset 13104 (in bits) at drm_connector.h:1081:1
    'u32 drm_connector::color_enc_fmt', at offset 13120 (in bits) at drm_connector.h:1082:1
    'u32 drm_connector::hdr_eotf', at offset 13152 (in bits) at drm_connector.h:1083:1
    'bool drm_connector::hdr_metadata_type_one', at offset 13184 (in bits) at drm_connector.h:1084:1
    'u32 drm_connector::hdr_max_luminance', at offset 13216 (in bits) at drm_connector.h:1085:1
    'u32 drm_connector::hdr_avg_luminance', at offset 13248 (in bits) at drm_connector.h:1086:1
    'u32 drm_connector::hdr_min_luminance', at offset 13280 (in bits) at drm_connector.h:1087:1
    'bool drm_connector::hdr_supported', at offset 13312 (in bits) at drm_connector.h:1088:1
    'u8 drm_connector::hdr_plus_app_ver', at offset 13320 (in bits) at drm_connector.h:1089:1
    'int drm_connector::max_tmds_char', at offset 13344 (in bits) at drm_connector.h:1101:1
    'bool drm_connector::scdc_present', at offset 13376 (in bits) at drm_connector.h:1102:1
    'bool drm_connector::rr_capable', at offset 13384 (in bits) at drm_connector.h:1103:1
    'bool drm_connector::supports_scramble', at offset 13392 (in bits) at drm_connector.h:1104:1
    'int drm_connector::flags_3d', at offset 13408 (in bits) at drm_connector.h:1105:1
    'hdr_output_metadata drm_connector::hdr_output_metadata', at offset 14016 (in bits) at drm_connector.h:1177:1
    'hdr_sink_metadata drm_connector::hdr_sink_metadata', at offset 14272 (in bits) at drm_connector.h:1178:1
    'drm_panel* drm_connector::panel', at offset 14400 (in bits) at drm_connector.h:1185:1
  there are data member changes:
    type 'struct drm_object_properties' of 'drm_connector::properties' changed:
      type size changed from 3136 to 8256 (in bits)
      there are data member changes:
        type 'drm_property*[24]' of 'drm_object_properties::properties' changed:
          type name changed from 'drm_property*[24]' to 'drm_property*[64]'
          array type size changed from 1536 to 4096
          array type subrange 1 changed length from 24 to 64
        and size changed from 1536 to 4096 (in bits) (by +2560 bits)
        type 'uint64_t[24]' of 'drm_object_properties::values' changed:
          type name changed from 'uint64_t[24]' to 'uint64_t[64]'
          array type size changed from 1536 to 4096
          array type subrange 1 changed length from 24 to 64
        and offset changed from 1600 to 4160 (in bits) (by +2560 bits), size changed from 1536 to 4096 (in bits) (by +2560 bits)
      192 impacted interfaces
    and size changed from 3136 to 8256 (in bits) (by +5120 bits)
    'drm_property* drm_connector::scaling_mode_property' offset changed from 5888 to 11008 (in bits) (by +5120 bits)
    'drm_property* drm_connector::content_protection_property' offset changed from 5952 to 11072 (in bits) (by +5120 bits)
    'drm_property_blob* drm_connector::path_blob_ptr' offset changed from 6016 to 11200 (in bits) (by +5184 bits)
    'uint8_t drm_connector::polled' offset changed from 6080 to 11264 (in bits) (by +5184 bits)
    'int drm_connector::dpms' offset changed from 6112 to 11296 (in bits) (by +5184 bits)
    'const drm_connector_helper_funcs* drm_connector::helper_private' offset changed from 6144 to 11328 (in bits) (by +5184 bits)
    'drm_cmdline_mode drm_connector::cmdline_mode' offset changed from 6208 to 11392 (in bits) (by +5184 bits)
    'drm_connector_force drm_connector::force' offset changed from 6432 to 11616 (in bits) (by +5184 bits)
    'bool drm_connector::override_edid' offset changed from 6464 to 11648 (in bits) (by +5184 bits)
    'uint32_t drm_connector::encoder_ids[3]' offset changed from 6496 to 11680 (in bits) (by +5184 bits)
    'drm_encoder* drm_connector::encoder' offset changed from 6592 to 11776 (in bits) (by +5184 bits)
    'uint8_t drm_connector::eld[128]' offset changed from 6656 to 11840 (in bits) (by +5184 bits)
    'bool drm_connector::latency_present[2]' offset changed from 7680 to 12864 (in bits) (by +5184 bits)
    'int drm_connector::video_latency[2]' offset changed from 7712 to 12896 (in bits) (by +5184 bits)
    'int drm_connector::audio_latency[2]' offset changed from 7776 to 12960 (in bits) (by +5184 bits)
    'int drm_connector::null_edid_counter' offset changed from 7840 to 13024 (in bits) (by +5184 bits)
    'unsigned int drm_connector::bad_edid_counter' offset changed from 7872 to 13056 (in bits) (by +5184 bits)
    'bool drm_connector::edid_corrupt' offset changed from 7904 to 13440 (in bits) (by +5536 bits)
    'dentry* drm_connector::debugfs_entry' offset changed from 7936 to 13504 (in bits) (by +5568 bits)
    'drm_connector_state* drm_connector::state' offset changed from 8000 to 13568 (in bits) (by +5568 bits)
    'drm_property_blob* drm_connector::tile_blob_ptr' offset changed from 8064 to 13632 (in bits) (by +5568 bits)
    'bool drm_connector::has_tile' offset changed from 8128 to 13696 (in bits) (by +5568 bits)
    'drm_tile_group* drm_connector::tile_group' offset changed from 8192 to 13760 (in bits) (by +5568 bits)
    'bool drm_connector::tile_is_single_monitor' offset changed from 8256 to 13824 (in bits) (by +5568 bits)
    'uint8_t drm_connector::num_h_tile' offset changed from 8264 to 13832 (in bits) (by +5568 bits)
    'uint8_t drm_connector::num_v_tile' offset changed from 8272 to 13840 (in bits) (by +5568 bits)
    'uint8_t drm_connector::tile_h_loc' offset changed from 8280 to 13848 (in bits) (by +5568 bits)
    'uint8_t drm_connector::tile_v_loc' offset changed from 8288 to 13856 (in bits) (by +5568 bits)
    'uint16_t drm_connector::tile_h_size' offset changed from 8304 to 13872 (in bits) (by +5568 bits)
    'uint16_t drm_connector::tile_v_size' offset changed from 8320 to 13888 (in bits) (by +5568 bits)
    'llist_node drm_connector::free_node' offset changed from 8384 to 13952 (in bits) (by +5568 bits)
  192 impacted interfaces

'struct drm_connector_state at drm_connector.h:382:1' changed:
  type size changed from 960 to 1088 (in bits)
  2 data member insertions:
    'u32 drm_connector_state::colorspace', at offset 896 (in bits) at drm_connector.h:485:1
    'drm_property_blob* drm_connector_state::hdr_output_metadata', at offset 1024 (in bits) at drm_connector.h:505:1
  there are data member changes:
    'drm_writeback_job* drm_connector_state::writeback_job' offset changed from 896 to 960 (in bits) (by +64 bits)
  192 impacted interfaces

'struct drm_crtc at drm_crtc.h:816:1' changed:
  type size changed from 9792 to 14912 (in bits)
  there are data member changes:
    type 'struct drm_object_properties' of 'drm_crtc::properties' changed as reported earlier
    and size changed from 3136 to 8256 (in bits) (by +5120 bits)
    'drm_crtc_state* drm_crtc::state' offset changed from 8576 to 13696 (in bits) (by +5120 bits)
    'list_head drm_crtc::commit_list' offset changed from 8640 to 13760 (in bits) (by +5120 bits)
    'spinlock_t drm_crtc::commit_lock' offset changed from 8768 to 13888 (in bits) (by +5120 bits)
    'drm_crtc_crc drm_crtc::crc' offset changed from 8832 to 13952 (in bits) (by +5120 bits)
    'unsigned int drm_crtc::fence_context' offset changed from 9408 to 14528 (in bits) (by +5120 bits)
    'spinlock_t drm_crtc::fence_lock' offset changed from 9440 to 14560 (in bits) (by +5120 bits)
    'unsigned long int drm_crtc::fence_seqno' offset changed from 9472 to 14592 (in bits) (by +5120 bits)
    'char drm_crtc::timeline_name[32]' offset changed from 9536 to 14656 (in bits) (by +5120 bits)
  192 impacted interfaces

'struct drm_device at drm_device.h:31:1' changed:
  type size changed from 13312 to 13376 (in bits)
  there are data member changes:
    type 'struct drm_mode_config' of 'drm_device::mode_config' changed:
      type size changed from 8192 to 8256 (in bits)
      1 data member insertion:
        'drm_property* drm_mode_config::hdr_output_metadata_property', at offset 7808 (in bits) at drm_mode_config.h:815:1
      there are data member changes:
        'uint32_t drm_mode_config::preferred_depth' offset changed from 7808 to 7872 (in bits) (by +64 bits)
        'uint32_t drm_mode_config::prefer_shadow' offset changed from 7840 to 7904 (in bits) (by +64 bits)
        'bool drm_mode_config::async_page_flip' offset changed from 7872 to 7936 (in bits) (by +64 bits)
        'bool drm_mode_config::allow_fb_modifiers' offset changed from 7880 to 7944 (in bits) (by +64 bits)
        'bool drm_mode_config::normalize_zpos' offset changed from 7888 to 7952 (in bits) (by +64 bits)
        'drm_property* drm_mode_config::modifiers_property' offset changed from 7936 to 8000 (in bits) (by +64 bits)
        'uint32_t drm_mode_config::cursor_width' offset changed from 8000 to 8064 (in bits) (by +64 bits)
        'uint32_t drm_mode_config::cursor_height' offset changed from 8032 to 8096 (in bits) (by +64 bits)
        'drm_atomic_state* drm_mode_config::suspend_state' offset changed from 8064 to 8128 (in bits) (by +64 bits)
        'const drm_mode_config_helper_funcs* drm_mode_config::helper_private' offset changed from 8128 to 8192 (in bits) (by +64 bits)
      192 impacted interfaces
    and size changed from 8192 to 8256 (in bits) (by +64 bits)
    'mutex drm_device::object_name_lock' offset changed from 12672 to 12736 (in bits) (by +64 bits)
    'idr drm_device::object_name_idr' offset changed from 12928 to 12992 (in bits) (by +64 bits)
    'drm_vma_offset_manager* drm_device::vma_offset_manager' offset changed from 13120 to 13184 (in bits) (by +64 bits)
    'int drm_device::switch_power_state' offset changed from 13184 to 13248 (in bits) (by +64 bits)
    'drm_fb_helper* drm_device::fb_helper' offset changed from 13248 to 13312 (in bits) (by +64 bits)
  192 impacted interfaces

'struct drm_dp_enum_path_resources_ack_reply at drm_dp_mst_helper.h:292:1' changed:
  type size hasn't changed
  1 data member insertion:
    'bool drm_dp_enum_path_resources_ack_reply::fec_capable', at offset 8 (in bits) at drm_dp_mst_helper.h:296:1
  16 impacted interfaces

'struct drm_dp_mst_port at drm_dp_mst_helper.h:69:1' changed:
  type size hasn't changed
  1 data member insertion:
    'bool drm_dp_mst_port::fec_capable', at offset 11208 (in bits) at drm_dp_mst_helper.h:102:1
  16 impacted interfaces

'struct drm_mode_config at drm_mode_config.h:352:1' changed:
  details were reported earlier

'struct drm_object_properties at drm_mode_object.h:67:1' changed:
  details were reported earlier

'struct drm_panel at drm_panel.h:89:1' changed:
  type size changed from 384 to 832 (in bits)
  1 data member insertion:
    'blocking_notifier_head drm_panel::nh', at offset 384 (in bits) at drm_panel.h:120:1
  4 impacted interfaces

'struct drm_plane at drm_plane.h:535:1' changed:
  type size changed from 5184 to 10304 (in bits)
  there are data member changes:
    type 'struct drm_object_properties' of 'drm_plane::properties' changed as reported earlier
    and size changed from 3136 to 8256 (in bits) (by +5120 bits)
    'drm_plane_type drm_plane::type' offset changed from 4672 to 9792 (in bits) (by +5120 bits)
    'unsigned int drm_plane::index' offset changed from 4704 to 9824 (in bits) (by +5120 bits)
    'const drm_plane_helper_funcs* drm_plane::helper_private' offset changed from 4736 to 9856 (in bits) (by +5120 bits)
    'drm_plane_state* drm_plane::state' offset changed from 4800 to 9920 (in bits) (by +5120 bits)
    'drm_property* drm_plane::alpha_property' offset changed from 4864 to 9984 (in bits) (by +5120 bits)
    'drm_property* drm_plane::zpos_property' offset changed from 4928 to 10048 (in bits) (by +5120 bits)
    'drm_property* drm_plane::rotation_property' offset changed from 4992 to 10112 (in bits) (by +5120 bits)
    'drm_property* drm_plane::color_encoding_property' offset changed from 5056 to 10176 (in bits) (by +5120 bits)
    'drm_property* drm_plane::color_range_property' offset changed from 5120 to 10240 (in bits) (by +5120 bits)
  192 impacted interfaces

'struct mipi_dsi_msg at drm_mipi_dsi.h:35:1' changed:
  type size changed from 320 to 384 (in bits)
  2 data member insertions:
    'u32 mipi_dsi_msg::ctrl', at offset 32 (in bits) at drm_mipi_dsi.h:43:1
    'u32 mipi_dsi_msg::wait_ms', at offset 64 (in bits) at drm_mipi_dsi.h:44:1
  there are data member changes:
    'size_t mipi_dsi_msg::tx_len' offset changed from 64 to 128 (in bits) (by +64 bits)
    'void* mipi_dsi_msg::tx_buf' offset changed from 128 to 192 (in bits) (by +64 bits)
    'size_t mipi_dsi_msg::rx_len' offset changed from 192 to 256 (in bits) (by +64 bits)
    'void* mipi_dsi_msg::rx_buf' offset changed from 256 to 320 (in bits) (by +64 bits)
  3 impacted interfaces
'union ack_replies at drm_dp_mst_helper.h:340:1' changed:
  type size hasn't changed
  there are data member changes:
    type 'struct drm_dp_enum_path_resources_ack_reply' of 'ack_replies::path_resources' changed as reported earlier
  16 impacted interfaces

Bug: 152417756
Test: Build only
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I5c07121ba8f4041bfc200c05d04ecf1d25ee9c24
2020-04-15 17:16:32 -07:00
Matthias Maennich
ccef2e800f ANDROID: ABI: add missing elf variables to representation
Due to a bug in libabigail, the elf variables were not recorded when
whitelisting was enabled. This has been fixed with version
1.8.0-6b54e408 of abidw, hence update the representation.

Leaf changes summary: 103 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 103 Added variables

103 Added variables:

  [A] 'cpumask __cpu_isolated_mask'
  [A] 'cpumask __cpu_online_mask'
  [A] 'cpumask __cpu_possible_mask'
  [A] 'cpumask __cpu_present_mask'
  [A] 'unsigned long int __per_cpu_offset[32]'
  [A] 'unsigned long int __stack_chk_guard'
  [A] 'tracepoint __tracepoint_clock_set_rate'
  [A] 'tracepoint __tracepoint_dma_fence_emit'
  [A] 'tracepoint __tracepoint_smmu_init'
  [A] 'tracepoint __tracepoint_tlbi_end'
  [A] 'tracepoint __tracepoint_tlbi_start'
  [A] 'tracepoint __tracepoint_tlbsync_timeout'
  [A] 'tracepoint __tracepoint_xdp_exception'
  [A] 'const unsigned char _ctype[256]'
  [A] 'bus_type amba_bustype'
  [A] 'void ()* arch_read_hardware_id'
  [A] 'static_key_false arch_timer_read_ool_enabled'
  [A] 'static_key_false arm64_const_caps_ready'
  [A] 'void ()* arm_pm_restart'
  [A] 'u32 audit_enabled'
  [A] 'unsigned int boot_reason'
  [A] 'br_should_route_hook_t* br_should_route_hook'
  [A] 'const clk_ops clk_fixed_factor_ops'
  [A] 'const clk_ops clk_fixed_rate_ops'
  [A] 'unsigned int cold_boot'
  [A] 'pglist_data contig_page_data'
  [A] 'const unsigned long int cpu_bit_bitmap[65][1]'
  [A] 'static_key_false cpu_hwcap_keys[62]'
  [A] 'unsigned long int cpu_hwcaps[1]'
  [A] 'int cpu_number'
  [A] 'bus_type cpu_subsys'
  [A] 'cpu_topology cpu_topology[32]'
  [A] 'freq_attr cpufreq_freq_attr_scaling_available_freqs'
  [A] 'freq_attr cpufreq_freq_attr_scaling_boost_freqs'
  [A] 'freq_attr* cpufreq_generic_attr[2]'
  [A] 'cpuidle_device cpuidle_dev'
  [A] 'const skb_checksum_ops* crc32c_csum_stub'
  [A] 'const u16 crc_ccitt_table[256]'
  [A] 'const crypto_type crypto_ablkcipher_type'
  [A] 'const crypto_type crypto_ahash_type'
  [A] 'cma* dma_contiguous_default_area'
  [A] 'const dma_fence_ops dma_fence_array_ops'
  [A] 'void ()* do_tlb_conf_fault_cb'
  [A] 'unsigned int drm_debug'
  [A] 'const dma_map_ops dummy_dma_ops'
  [A] 'flow_dissector flow_keys_basic_dissector'
  [A] 'bio_set fs_bio_set'
  [A] 'const icmp_err icmp_err_convert[16]'
  [A] 'net init_net'
  [A] 'uts_namespace init_uts_ns'
  [A] 'resource iomem_resource'
  [A] 'kobject* kernel_kobj'
  [A] 'u64 kimage_voffset'
  [A] 'kmem_cache* kmalloc_caches[2][14]'
  [A] 'const char linux_banner[381]'
  [A] 's64 memstart_addr'
  [A] 'unsigned long int mmap_min_addr'
  [A] 'kset* module_kset'
  [A] 'kobj_type module_ktype'
  [A] 'const nf_br_ops* nf_br_ops'
  [A] 'static_key nf_hooks_needed[13][5]'
  [A] 'const nf_ipv6_ops* nf_ipv6_ops'
  [A] 'unsigned int nr_cpu_ids'
  [A] 'atomic_long_t nr_swap_pages'
  [A] 'const fwnode_operations of_fwnode_ops'
  [A] 'int overflowuid'
  [A] 'atomic_notifier_head panic_notifier_list'
  [A] 'int panic_timeout'
  [A] 'const kernel_param_ops param_ops_bint'
  [A] 'const kernel_param_ops param_ops_bool'
  [A] 'const kernel_param_ops param_ops_byte'
  [A] 'const kernel_param_ops param_ops_charp'
  [A] 'const kernel_param_ops param_ops_int'
  [A] 'const kernel_param_ops param_ops_long'
  [A] 'const kernel_param_ops param_ops_string'
  [A] 'const kernel_param_ops param_ops_uint'
  [A] 'bus_type pci_bus_type'
  [A] 'int percpu_counter_batch'
  [A] 'bus_type platform_bus_type'
  [A] 'bool pm_freezing'
  [A] 'void ()* pm_power_off'
  [A] 'kobject* power_kobj'
  [A] 'ww_class reservation_ww_class'
  [A] 'static_key rfs_needed'
  [A] 'u32 rps_cpu_mask'
  [A] 'rps_sock_flow_table* rps_sock_flow_table'
  [A] 'char* saved_command_line'
  [A] 'const snd_pcm_chmap_elem snd_pcm_alt_chmaps[6]'
  [A] 'const snd_pcm_chmap_elem snd_pcm_std_chmaps[6]'
  [A] 'const dev_pm_ops snd_soc_pm_ops'
  [A] 'timezone sys_tz'
  [A] 'workqueue_struct* system_freezable_wq'
  [A] 'atomic_t system_freezing_cnt'
  [A] 'workqueue_struct* system_highpri_wq'
  [A] 'workqueue_struct* system_long_wq'
  [A] 'system_states system_state'
  [A] 'workqueue_struct* system_unbound_wq'
  [A] 'workqueue_struct* system_wq'
  [A] 'const arch_timer_erratum_workaround* timer_unstable_counter_workaround'
  [A] 'unsigned long int totalram_pages'
  [A] 'const v4l2_file_operations v4l2_subdev_fops'
  [A] 'const vb2_mem_ops vb2_vmalloc_memops'
  [A] 'void ()* vendor_panic_cb'

Bug: 153703873
Change-Id: I7a7552328e57e2eb883c616753c25178ae304a45
Signed-off-by: Matthias Maennich <maennich@google.com>
2020-04-15 22:45:45 +00:00
Badhri Jagan Sridharan
4211b82346 ANDROID: GKI: power_supply: Add PROP_MOISTURE_DETECTION_ENABLED
Add a power supply prop to enable/disable moisture detection.

Bug: 148999666
Change-Id: Ie5b3b721a7f8513990de798288fbf4dea361e5ed
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
(cherry picked from commit 84afb7d015a12d7933e1729856e5091166c2ab7c)
Signed-off-by: rickyniu <rickyniu@google.com>
(cherry picked from commit 50d8261cd912d185c7602bb7f8960b4d4c8e7362)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-15 19:12:25 +00:00
Shashank Babu Chinta Venkata
6f11f11820 ANDROID: include: drm: add the definitions for DP Link Compliance tests
Add the definitions for various DPCD register offsets and
corresponding parameter values for DP Link compliance tests
for PHY audio/link training/link status tests.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: If6aa7d9b77e6234780086f27515c346b6495a46f
2020-04-15 13:40:34 +00:00
Shashank Babu Chinta Venkata
7017a09c4d ANDROID: drivers: gpu: drm: fix bugs encountered while fuzzing
DRM framework does not have upper bound on number of open
file descriptors, this resulted in exhaustion
of file descriptors while fuzzing. Also, adding a
upper bound on memory allocation for
drm_propert_blob structure.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: I42bd3696371db6ae37789e3f7f43db045e166898
2020-04-15 13:38:40 +00:00
Dan Murphy
67eaae5d74 FROMLIST: power_supply: Add additional health properties to the header
Add HEALTH_WARM, HEALTH_COOL and HEALTH_HOT to the health enum.

Bug: 149071038
Test: Builds
Link: https://lore.kernel.org/linux-pm/20200116175039.1317-3-dmurphy@ti.com/

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Tested-by: Guru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: Sandeep Patil <sspatil@google.com>
Change-Id: I5a99577e8c8c38c2ea10a339223c177d18c93d37
2020-04-15 04:44:56 +00:00
Dan Murphy
4d5777cfbf UPSTREAM: power: supply: core: Update sysfs-class-power ABI document
Add the "Over Current" string to /sys/class/power_supply/<supply_name>/health
description.

Bug: 149071038
Test: Builds

Fixes: e3e83cc601 ("power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 333853be56)
Signed-off-by: Sandeep Patil <sspatil@google.com>
Change-Id: Icd423387bde55285bd18d6871bba6f37efd2e034
2020-04-15 04:44:47 +00:00
Shashank Babu Chinta Venkata
0ea9d81fdc ANDROID: drivers: gpu: drm: add support for secure framebuffer
Add mode flag to indicate friamebuffer operating in
secure mode.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: I95d66c8a0cd56262aa779de568650a3e48240b1f
2020-04-14 22:51:44 +00:00
Shashank Babu Chinta Venkata
ecb9944f6c ANDROID: include: uapi: drm: add additional QCOM modifiers
Add QCOM modifiers to support frame buffer size
calculations for linear and compressed tp10 format
and a5x tile pixel formats.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: If2c5777514130f5f1dfeadf241af06b7adc9429c
2020-04-14 22:18:35 +00:00
Shashank Babu Chinta Venkata
23204100da ANDROID: drm: dsi: add two DSI mode flags for BLLP
Add two dsi mode flag namely MIPI_DSI_MODE_VIDEO_BLLP
and MIPI_DSI_MODE_VIDEO_EOF_BLLP. MIPI_DSI_MODE_VIDEO_BLLP
flag is used when DSI is allowed to enter low power stop mode
during BLLP period, and MIPI_DSI_MODE_VIDEO_EOF_BLLP
is used when DSI is allowed to enter low power stop  mode in
the BLLP area of the last line of a frame.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: I54c1d0cc7a87d23054b82cfa975117f0590ca2d3
2020-04-14 22:18:17 +00:00
Shashank Babu Chinta Venkata
c0936c90ec ANDROID: include: uapi: drm: add additional drm mode flags
Add additional drm mode flags to specify panel capability
to support command mode and video mode seamless transition.
Additionally, add mode flags to specify support for
YUV, RGB formats.

Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Bug: 139653858
Change-Id: Ifdc71a123f1f697ff9b5dbe6a6e2f557c3069060
2020-04-14 22:16:39 +00:00
Emil Velikov
1474b86e39 UPSTREAM: drm: plug memory leak on drm_setup() failure
Currently we fail to free and detach the drm_file when drm_setup() fails.
Use the drm_close_helper to do address that.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190114084410.15266-2-emil.l.velikov@gmail.com
(cherry picked from commit 4acc5be3cd)
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ie9af860c8fae31812b7276f779e0bd9951a944b4
2020-04-14 21:51:51 +00:00
Emil Velikov
89e8a2f6f5 UPSTREAM: drm: factor out drm_close_helper() function
Will be used to plug an existing memory leak.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190114084410.15266-1-emil.l.velikov@gmail.com
(cherry picked from commit e21710a893)
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Id2ec9a880b3a636e2d1d73d85cb5ff2e8614725e
2020-04-14 21:51:44 +00:00
Hridya Valsaraju
8dd22d7e90 ANDROID: GKI: Bulk ABI update
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function snd_usb_substream* find_snd_usb_substream(unsigned int, unsigned int, unsigned int, snd_usb_audio**, void ()*)'
  [A] 'function int snd_usb_enable_audio_stream(snd_usb_substream*, int, bool)'

'struct station_info at cfg80211.h:1385:1' changed:
  type size changed from 1536 to 1600 (in bits)
  2 data member insertions:
    'u32 station_info::rx_mpdu_count', at offset 1504 (in bits) at cfg80211.h:1435:1
    'u32 station_info::fcs_err_count', at offset 1536 (in bits) at cfg80211.h:1436:1
  3 impacted interfaces

Test: build
Bug: 149430094
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: Icf934b876e501070fe370228ffaab4b264ccd255
2020-04-14 13:02:51 -07:00
Ankita Bajaj
8766a7247a BACKPORT: nl80211: Add per peer statistics to compute FCS error rate
Add support for drivers to report the total number of MPDUs received
and the number of MPDUs received with an FCS error from a specific
peer. These counters will be incremented only when the TA of the
frame matches the MAC address of the peer irrespective of FCS
error.

It should be noted that the TA field in the frame might be corrupted
when there is an FCS error and TA matching logic would fail in such
cases. Hence, FCS error counter might not be fully accurate, but it can
provide help in detecting bad RX links in significant number of cases.
This FCS error counter without full accuracy can be used, e.g., to
trigger a kick-out of a connected client with a bad link in AP mode to
force such a client to roam to another AP.

Test: build
Bug: 153912588
Signed-off-by: Ankita Bajaj <bankita@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 0d4e14a32d)
[hridya: resolved minor conflicts]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: I5306d36e6df255efcb130b0de5151bebda67c549
2020-04-14 12:57:22 -07:00
Hridya Valsaraju
6da0c634f8 ANDROID: GKI: sound: usb: Add snd_usb_enable_audio_stream/find_snd_usb_substream
Add functions snd_usb_enable_audio_stream and find_snd_usb_substream
to resolve ABI diff.

Test: build
Bug: 151372815
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Change-Id: I658d525233be3eb657a3b36c81a3920e65e96a40
(cherry picked from commit f055b3843f78a67497bbab7da5ea6405823bb861)
[hridya: only include ABI diff, add EXPORT_SYMBOL_GPL,
add some pointer checks]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-14 12:57:13 -07:00
Mark Salyzyn
1c20c327b6 ANDROID: GKI: add dma-buf includes
CRC ABI introduced with
commit ac04f0739dd8cc3da06a01bd3ce3b7519de88f79
("ion : Merge ion changes for msm-kona kernel upgrade")
Author: Swathi Sridhar <swatsrid@codeaurora.org>

Resulted in three include files being introduced that alter
the CRC generated for module versions, resulting in what
formerly forward references, now fully known.

Fixes the following CRC problems:
 dma_buf_begin_cpu_access
 dma_buf_end_cpu_access
 dma_buf_fd
 dma_buf_get
 dma_buf_get_flags
 dma_buf_kmap
 dma_buf_kunmap
 dma_buf_put
 dma_buf_attach
 dma_buf_detach
 dma_buf_map_attachment
 dma_buf_unmap_attachment
 dma_buf_export

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: I3fa65229367e7ce43e1cb1dd14d163e221b03e62
2020-04-14 10:23:15 -07:00
Thara Gopinath
c83082217a ANDROID: GKI: sched: struct fields for Per-Sched-domain over utilization
This commit only changes the struct fields needed to fix ABI
differences.

Bug: 153905799
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
Change-Id: I3f327cff4080096a3e58208dd72c9b7f7913cdb2
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
(cherry picked from commit addef37808728c719d8c095a75bcf81befdacdaf)
[saravanak cherry-picked only the struct differences]
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-14 16:21:16 +00:00
Saravana Kannan
cb2fe03684 ANDROID: GKI: Add vendor fields to root_domain
This is needed for ABI compatibility

Bug: 153905799
Change-Id: Idd802feeb29652e9f575faff8a0770af5697eedb
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-14 16:21:06 +00:00
Saravana Kannan
adeb470374 ANDROID: gki_defconfig: Enable CONFIG_IRQ_TIME_ACCOUNTING
Some vendors use this. So enable it.

Bug: 153905799
Change-Id: Ia7de7437c2921ac6a60d2b3e255146251fb1d4a3
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-14 16:20:46 +00:00
Will McVicker
9f02b3b447 ANDROID: fix allmodconfig build to use the right toolchain
Without these changes, the user will be prompted for config changes.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153934356
Test: BUILD_CONFIG=common/build.config.allmodconfig.aarch64 build/build.sh
Change-Id: Ib9ef72b217d1e0d78edf136cfe560058e3126d18
2020-04-14 15:40:56 +00:00
Suren Baghdasaryan
b8b3040a57 ANDROID: GKI: Update ABI
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct pglist_data at mmzone.h:639:1' changed:
  type size changed from 31232 to 30208 (in bits)
  there are data member changes:
    'zone pglist_data::node_zones[2]' size changed from 25600 to 24576 (in bits) (by -1024 bits)
    'zonelist pglist_data::node_zonelists[1]' offset changed from 25600 to 24576 (in bits) (by -1024 bits)
    'int pglist_data::nr_zones' offset changed from 25984 to 24960 (in bits) (by -1024 bits)
    'unsigned long int pglist_data::node_start_pfn' offset changed from 26048 to 25024 (in bits) (by -1024 bits)
    'unsigned long int pglist_data::node_present_pages' offset changed from 26112 to 25088 (in bits) (by -1024 bits)
    'unsigned long int pglist_data::node_spanned_pages' offset changed from 26176 to 25152 (in bits) (by -1024 bits)
    'int pglist_data::node_id' offset changed from 26240 to 25216 (in bits) (by -1024 bits)
    'wait_queue_head_t pglist_data::kswapd_wait' offset changed from 26304 to 25280 (in bits) (by -1024 bits)
    'wait_queue_head_t pglist_data::pfmemalloc_wait' offset changed from 26496 to 25472 (in bits) (by -1024 bits)
    'task_struct* pglist_data::kswapd' offset changed from 26688 to 25664 (in bits) (by -1024 bits)
    'int pglist_data::kswapd_order' offset changed from 26752 to 25728 (in bits) (by -1024 bits)
    'zone_type pglist_data::kswapd_classzone_idx' offset changed from 26784 to 25760 (in bits) (by -1024 bits)
    'int pglist_data::kswapd_failures' offset changed from 26816 to 25792 (in bits) (by -1024 bits)
    'int pglist_data::kcompactd_max_order' offset changed from 26848 to 25824 (in bits) (by -1024 bits)
    'zone_type pglist_data::kcompactd_classzone_idx' offset changed from 26880 to 25856 (in bits) (by -1024 bits)
    'wait_queue_head_t pglist_data::kcompactd_wait' offset changed from 26944 to 25920 (in bits) (by -1024 bits)
    'task_struct* pglist_data::kcompactd' offset changed from 27136 to 26112 (in bits) (by -1024 bits)
    'unsigned long int pglist_data::totalreserve_pages' offset changed from 27200 to 26176 (in bits) (by -1024 bits)
    'zone_padding pglist_data::_pad1_' offset changed from 27648 to 26624 (in bits) (by -1024 bits)
    'spinlock_t pglist_data::lru_lock' offset changed from 27648 to 26624 (in bits) (by -1024 bits)
    'lruvec pglist_data::lruvec' offset changed from 27712 to 26688 (in bits) (by -1024 bits)
    'unsigned long int pglist_data::flags' offset changed from 28800 to 27776 (in bits) (by -1024 bits)
    'zone_padding pglist_data::_pad2_' offset changed from 29184 to 28160 (in bits) (by -1024 bits)
    'per_cpu_nodestat* pglist_data::per_cpu_nodestats' offset changed from 29184 to 28160 (in bits) (by -1024 bits)
    'atomic_long_t pglist_data::vm_stat[30]' offset changed from 29248 to 28224 (in bits) (by -1024 bits)
  548 impacted interfaces

'struct zone at mmzone.h:367:1' changed:
  type size changed from 12800 to 12288 (in bits)
  3 data member deletions:
    'unsigned long int zone::watermark_boost', at offset 192 (in bits) at mmzone.h:372:1
    'unsigned long int zone::compact_init_migrate_pfn', at offset 11520 (in bits) at mmzone.h:498:1
    'unsigned long int zone::compact_init_free_pfn', at offset 11584 (in bits) at mmzone.h:499:1
  there are data member changes:
    'unsigned long int zone::nr_reserved_highatomic' offset changed from 256 to 192 (in bits) (by -64 bits)
    'long int zone::lowmem_reserve[2]' offset changed from 320 to 256 (in bits) (by -64 bits)
    'pglist_data* zone::zone_pgdat' offset changed from 448 to 384 (in bits) (by -64 bits)
    'per_cpu_pageset* zone::pageset' offset changed from 512 to 448 (in bits) (by -64 bits)
    'bool zone::cma_alloc' offset changed from 576 to 512 (in bits) (by -64 bits)
    'unsigned long int zone::zone_start_pfn' offset changed from 640 to 576 (in bits) (by -64 bits)
    'unsigned long int zone::managed_pages' offset changed from 704 to 640 (in bits) (by -64 bits)
    'unsigned long int zone::spanned_pages' offset changed from 768 to 704 (in bits) (by -64 bits)
    'unsigned long int zone::present_pages' offset changed from 832 to 768 (in bits) (by -64 bits)
    'const char* zone::name' offset changed from 896 to 832 (in bits) (by -64 bits)
    'unsigned long int zone::nr_isolate_pageblock' offset changed from 960 to 896 (in bits) (by -64 bits)
    'int zone::initialized' offset changed from 1024 to 960 (in bits) (by -64 bits)
    'zone_padding zone::_pad1_' offset changed from 1536 to 1024 (in bits) (by -512 bits)
    'free_area zone::free_area[11]' offset changed from 1536 to 1024 (in bits) (by -512 bits)
    'unsigned long int zone::flags' offset changed from 10688 to 10176 (in bits) (by -512 bits)
    'spinlock_t zone::lock' offset changed from 10752 to 10240 (in bits) (by -512 bits)
    'zone_padding zone::_pad2_' offset changed from 11264 to 10752 (in bits) (by -512 bits)
    'unsigned long int zone::percpu_drift_mark' offset changed from 11264 to 10752 (in bits) (by -512 bits)
    'unsigned long int zone::compact_cached_free_pfn' offset changed from 11328 to 10816 (in bits) (by -512 bits)
    'unsigned long int zone::compact_cached_migrate_pfn[2]' offset changed from 11392 to 10880 (in bits) (by -512 bits)
    'unsigned int zone::compact_considered' offset changed from 11648 to 11008 (in bits) (by -640 bits)
    'unsigned int zone::compact_defer_shift' offset changed from 11680 to 11040 (in bits) (by -640 bits)
    'int zone::compact_order_failed' offset changed from 11712 to 11072 (in bits) (by -640 bits)
    'bool zone::compact_blockskip_flush' offset changed from 11744 to 11104 (in bits) (by -640 bits)
    'bool zone::contiguous' offset changed from 11752 to 11112 (in bits) (by -640 bits)
    'zone_padding zone::_pad3_' offset changed from 11776 to 11264 (in bits) (by -512 bits)
    'atomic_long_t zone::vm_stat[14]' offset changed from 11776 to 11264 (in bits) (by -512 bits)
    'atomic_long_t zone::vm_numa_stat[]' offset changed from 12672 to 12160 (in bits) (by -512 bits)
  548 impacted interfaces

Bug: 140544941
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I85847dc52c3e002f8978d020d1e4ccf8a638d5ba
Signed-off-by: Martin Liu <liumartin@google.com>
2020-04-14 19:39:12 +08:00
Mark Salyzyn
82d4e597c4 Revert "UPSTREAM: mm, page_alloc: spread allocations across zones before introducing fragmentation"
This reverts commit 8ad4b225e8.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I340fb8af98b3f6e033fd5463b082fbca43abe941
2020-04-14 19:36:13 +08:00
Mark Salyzyn
5e86f20f4f Revert "UPSTREAM: mm: use alloc_flags to record if kswapd can wake"
This reverts commit 112ced56ce.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I400cabb69dc9e24ea5d84f677315dbb3bfd34e45
2020-04-14 19:35:59 +08:00
Mark Salyzyn
fbc355c16d Revert "BACKPORT: mm: move zone watermark accesses behind an accessor"
This reverts commit acfb1c608b.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I4988ddf1fc24579d4fc478de1de6e45b870f7bcd
2020-04-14 19:35:44 +08:00
Mark Salyzyn
35be952ae0 Revert "BACKPORT: mm: reclaim small amounts of memory when an external fragmentation event occurs"
This reverts commit 5cbbeadd5a.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I65735f27f6a44a112957bcec07e2f63f2d8ccff6
2020-04-14 19:35:27 +08:00
Mark Salyzyn
776eba0172 Revert "BACKPORT: mm, compaction: be selective about what pageblocks to clear skip hints"
This reverts commit fd9c71c06b.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I58d978c6f74f8a1a04b17fa6d3890ddc4f1988c0
2020-04-14 19:35:13 +08:00
Will McVicker
56ebfff5eb ANDROID: GKI: panic: add vendor callback function in panic()
Each vendor might want to implement some debug code when the kernel
panics. So, add a vendor_panic_cb callback for vendors to implement.

Bug: 149258398
Test: compile
Change-Id: I7a374b0089f72c2511db6fe3b8cdd18f41a1eb6c
Signed-off-by: Saravana Kannan <saravanak@google.com>
(cherry picked from commit 911d9c70c2c50b0383ed0b652bb84ca8832e4a2b)
Signed-off-by: Will McVicker <willmcvicker@google.com>
[willmcvicker: only pulled in the ABI diffs]
2020-04-14 05:24:52 +00:00
Jean-Francois Dagenais
7de8e1e424 UPSTREAM: GKI: thermal: make device_register's type argument const
...because it can be, the buffer is strlcpy'd into a local buffer in a
thermal struct member.

Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
(cherry picked from commit f991de53a8)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: I3c9f18f4459890cc2ebcbf9bc6f9e6e3da339dfb
2020-04-13 17:46:47 -07:00
TeYuan Wang
47862b5635 ANDROID: GKI: add base.h include to match MODULE_VERSIONS
Partial cherry picked from
commit 6c1ddabbd1d51b8f1704c682fa0c7a8695cbad12
("thermal: Create softlink by name for thermal_zone and cooling device")

Bug: 139859938
Bug: 118439547
Test: tz and cdev softlink can be created at
sys/devices/virtual/thermal and sys/class/thermal.
Signed-off-by: TeYuan Wang <kamewang@google.com>
Signed-off-by: davidchao <davidchao@google.com>
(cherry picked from commit 6c1ddabbd1d51b8f1704c682fa0c7a8695cbad12)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: Ic2d265dcec4caba228b4e86dc1163c13952d8d3b
2020-04-13 17:46:33 -07:00
Will McVicker
fd2ab11899 ANDROID: update the ABI based on the new whitelist
Leaf changes summary: 13 artifacts changed
Changed leaf types summary: 8 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153886473
Test: compile
Change-Id: Iccfb858ca7257af5885d3a81c9bf291b1a4279f3
2020-04-13 23:34:07 +00:00
lucaswei
51c2add6cc ANDROID: GKI: fdt: export symbols required by modules
Export these symbols for modularized drivers.
  of_fdt_get_ddrrank
  of_fdt_get_ddrhbb

Bug: 153905290
Bug: 151601060
Bug: 151568484
Test: compile
Change-Id: I3a20d333ed4b6450d3721d6ae191fc31be2033ed
Signed-off-by: lucaswei <lucaswei@google.com>
(cherry picked from commit b2c6888bdfbb768bdb40cdccd1a972548997e940)
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-13 23:33:52 +00:00
Kaushal Kumar
643e14cfa2 ANDROID: GKI: drivers: of: Add APIs to find DDR device rank, HBB
Add APIs to find the DDR device rank and Highest
Bank Bit (HBB) information from their respective
memory nodes.

Bug: 153905290
Test: compile
Change-Id: Iae94efc681daf2cf0a531dceb8d2acdcf3484388
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
(cherry picked from commit 789ad9a7a829c6c423125eac3490967916c46ba9)
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-13 16:30:04 -07:00
Will McVicker
e941a5081c ANDROID: GKI: security: Add mmap export symbols for modules
Bug: 141876853
Test: compile

Change-Id: I6a5f5c2b71f3450a86c9ab20239df51519abf649
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit 3758a400cf70e5389267bd27b0bb86761b6c3241)
2020-04-13 16:30:04 -07:00
Rick Adams
b3bae00cda ANDROID: GKI: arch: add stub symbols for boot_reason and cold_boot
These symbols are needed by some vendor drivers. So add stubs symbols to
please those drivers.

Bug: 153902877
Test: compile
Signed-off-by: Rick Adams <rgadams@codeaurora.org>
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Signed-off-by: David Collins <collinsd@codeaurora.org>
[willmcvicker: Squashed the following commits but only took ABI diffs:
  f699c92b61 msm: 8x55: put reason for boot in procfs from SMEM
  ee67650037 sysctl: add cold_boot sysctl entry
  de98b0ac25 sysctl: add boot_reason and cold_boot sysctl entries for arm64]
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I1c3eb7bcf9fb2ccae870a3fb4b9e31138609cf46
2020-04-13 16:29:59 -07:00
Hemant Kumar
5b6a5354d0 ANDROID: GKI: USB: Fix ABI diff for struct usb_bus
Adds new member skip_resume to struct usb_bus to resolve ABI diff.
This patch also adds the capability to skip device resume during
system resume. It allows xHC to remain in low power mode and not
resume the bus when system wide resume happens.
Instead, the controller comes out of low power mode only
when usb device issues a remote wakeup or if there is
host initiated bus resume.

Test: build
Bug: 153445212
Change-Id: I96cdcb9e3642906b4afa08d9bde07e123d9b3977
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit 567a7ba0cc8c96d8b01ea290417c8397d1acd078)
[hridya: partial cherry-pick]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-13 22:13:50 +00:00
Hridya Valsaraju
632093eced ANDROID: GKI: USB: Resolve ABI diff for usb_gadget and usb_gadget_ops
Also, adds function usb_gsi_ep_op and resolves ABI diff for
struct usb_ep_ops by adding new member gsi_ep_ops. Also
resolves ABI diff for struct usb_request by adding member udc_priv.

Test: build
Bug: 153676200
Change-Id: I04a59f7a2670fb80afa5822b79ea488bc94abdfe
(cherry picked from commit 62523500193e11a8837d4c76ef4a42be2ca4ea0f)
[hridya: EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL, cherry-picked only the ABI
diff, added some null pointer checks and documentation]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-13 22:13:38 +00:00
Mark Salyzyn
2ebf287bf7 ANDROID: GKI: add hidden V4L2_MEM2MEM_DEV
Solve ABI issue with struct v4l2_fh

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151246806
Bug: 153738240
Bug: 151399858
Change-Id: I9671a692b1b8450ff2f6266cc9dde9e6fb0c9297
2020-04-13 21:58:26 +00:00
Mark Salyzyn
ab463cee83 ANDROID: GKI: enable VIDEO_V4L2_SUBDEV_API
ABI resolution for a series of v4l2 functions.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: I90dff74d8ec85857e6fc31dfbc83a2e737ac13d6
2020-04-13 21:58:13 +00:00
Will McVicker
0a2394dc5a ANDROID: GKI: export symbols from abi_gki_aarch64_qcom_whitelist
Run the script,
  $ ../build/gki/add_EXPORT_SYMBOL_GPL < abi_gki_aarch64_qcom_whitelist

This will export all the required symbols that are in this kernel.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153886473
Test: compile
Change-Id: I703509d75104cd86f472481346e3efbd235121ab
2020-04-13 21:36:41 +00:00
Will McVicker
6baa77a312 ANDROID: Update the whitelist for qcom SoCs
Mainly removes debug symbols and adds CFI symbols.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153886473
Change-Id: I2e10f9e63ba4a733429769b99af3307a78c6537b
2020-04-13 21:36:32 +00:00
Paul Lawrence
580b23c95a ANDROID: Incremental fs: Fix compound page usercopy crash
Bug: 153560805
Test: incfs_test passes on qemu and Pixel 4
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I1b55341e4e4247a74f3f539b9d190fef0ca409b8
2020-04-13 20:45:20 +00:00